Click the download link and save the JavaScript file to a new working folder, ready for playing with. You’ll need to put it where our HTML files can see it: commonly in a scripts or javascript directory beneath your site’s document root To make it all work, we need to tell our HTML file to include the jQuery library.
<head>
<title>Hello jQuery world!</title>
<script type='text/javascript' src='jquery-1.4-min.js'></script>
<script type='text/javascript' src='script.js'></script>
</head>
The first script tag on the page loads the jQuery library, and the second script tag points to a script.js file, which is where we’ll run our own jQuery code.
No comments:
Post a Comment