I use jQuery template on my site, I would like to put them all on a separate file. How do it do it?
Here is one example
<script type="text/template" id="request-template">......</script>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
if you have a big application, i suggest you look into require.js
in combination with the text plugin
require.js allows you to dynamically load your scripts when they are needed,
the text plugin is ideal for loading text content files the same way you would use it on javascript modules. so you could put your templates in separate files, and list them as dependencies for your javascript, then they get loaded when the javascript needs them.
edit
simple solution: put your script blocks in a separate html file, use jquery to load them in.
separatefile.html
your script: