mover javascript file to the template file