Changed the order in javascript

changed the order of the text in the javascript in order for everything
to appear as it is meaant to since i changed from an append to a
prepend.