Functions in separate file
The jQuery functions could be kept in a separate file with an extension .js
The file could be referred in the HTML page using src attribute.
For example if you have written your jQuery codes in a separate file called "myjquerycode.js" in the same folder in which the html file is placed. then you could refer it using following lines in your HTML page.
<head><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="myjquerycode.js"> </script>
</head>
No comments:
Post a Comment