Using js from template