What

jQuery is an amazing javascript library that makes it easy to create wonderful web effects in just a few lines of code. As the website says, it makes javascript fun.

If you’re thinking… “Boy, I need another javascript library like I need another hole in my head” then join the club. That’s exactly what I thought when I first came across it.

I had already used Moo.fx, Scriptaculous, TW-SACK, and Prototype. I had dabbled with RICO, Yahoo YUI, and other libraries.

Unlinke PHP, javascript does not come naturally to me… but I was doing my best to keep my head above water and keep up with all this AJAX madness.

So when I came across jQuery I thought “Yet another javascript library… no thanks.”

Why

So why did I change my mind about jQuery and why should you consider using it?

Simple. In just one glance at the source code of a page using jQuery you’ll see how easy it is to use, how much it accomplishes in so few lines of code, and how graceful it is.

My mind was opened one day when I stumbled across some code written with jQuery. Over morning coffee, I was flipping through the RSS feeds and reading my daily dose of web design blogs when I came across an example of javascript loveliness that used jQuery. Truth be told, the code on that site had some browser related bugs… but the concept was something I hadn’t seen before.

And the code…

The code looked almost simple. Like nothing I had seen before. It made sense.

I started reading through the documentation and was amazed to see how much could be done with so little extra code.

When

You should use jQuery when you need

  • A small library that gives you…
  • Powerful control over the Document Object Model
  • With very little effort or work on your part

Or…

  • Quick access to AJAX
  • Without a lot of bloat (overhead – wasted code)
  • And some basic animation effects to spice things up

But…

If you need super fancy effects for animation, drag and drop, and super smooth animation then you’ll probably want to use Prototype and one of the many great library created to enhance the effects.

Where

You can download the source code (10k) and some excellent tutorials at the jQuery website.

Who

jQuery was created by John Resig.