JavaScript
Article

How To Setup jQuery in 3 Easy Steps

By Sam Deering

what-is-jquery-tag-cloud

What is jQuery? and how can I start using it? 3 Easy Steps!

These instructions are to help all you jQuery newbies out there who might be using jQuery for the first time and are wondering “how do I set jQuery up?”. Well there are a two different ways to do this:

The first way is to self host your jQuery package:

  1. Download the latest jQuery Package
  2. Save it in a folder called “js”
  3. Include this line in your web page:

Note: There are 2 versions of jQuery, a minified version and a source version. I recommend that you use the minified version as it is smaller in size and will make your web page load faster.  The Benefits of jQuery are many but the main difference between the jQuery source version and the jQuery minified version is that the jQuery source version is human readable for you to check how the various jQuery functions are put together.

The second way is to load your jQuery package “on the fly” Load jQuery with Google Libraries API.

I would recommend to use the first method and host jQuery package yourself but the second method is good also: See Benefits of Google hosted jQuery.

Free Guide:

7 Habits of Successful CTOs

"What makes a great CTO?" Engineering skills? Business savvy? An innate tendency to channel a mythical creature (ahem, unicorn)? All of the above? Discover the top traits of the most successful CTOs in this free guide.

Recommended
Sponsors
Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in JavaScript, once a week, for free.