Changed the places of the javascript.