Showing posts with label Installation. Show all posts
Showing posts with label Installation. Show all posts

Saturday, July 14, 2012

Installing jQuery


You've read about jQuery and you want to install it on your site.  Now what?

Installing the library is as easy as linking in a single .js file (for the core functions) and optionally the jQuery UI library if you want to use some of the extra features.  For now we'll focus on the core library, since the technique for jQuery UI is the same.  Once the library is included on your page, you call the functions almost the same as you would with plain javascript, with the <SCRIPT> </SCRIPT> tags.  You'll want to wait for the DOM to be ready before calling your code...  In plain old javascript that was normally done like this:

<script>
   function init() {
      // Call your startup code here
   }
   window.onload = init;
</script>