Give Me 15 Minutes and I’ll Make You A jQuery Expert

Page content


jQuery - Write Less, Do MoreIn the spirit of rapid web development, I’ve stumbled upon jQuery. Here’s a testimonial from a jQuery user:

You start with 10 lines of jQuery that would have been 20 lines of tedious DOM JavaScript. By the time you are done it’s down to two or three lines and it couldn’t get any shorter unless it read your mind."

In my experience it’s been more like five (5) lines of jQuery.

jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.

I’ve found jQuery great for the following reasons:

  • Simple Ajax in a breeze
  • Search for elements in the DOM is made easy
  • The helper function [ $() ] is a pleasure to use
  • Most importantly: it handles cross browser compatibility.

Here We Go - Tutorials Galore

Your first step will be to Download jQuery 1.2.1 and include it in the head of your web page. After this you need to start reading some tutorials. Don’t worry, it’s going to take 15 minutes tops for you to start writing usable code:

Why I Use jQuery

jQuery is fast, small, and easy to learn. It’s the core for many of the simpler Ajax I use in my web pages. Since I’m using CakePHP, there’s also Prototype, but that’s another story. I really don’t like having to learn a new language when I’m trying to do something simple. I don’t want to go delving into DOM and all that stuff just to dynamically add a class onto an element in the form. If I was a JavaScript programmer, it may not be a big deal for me. But, to me, there’s nothing worse than writing bad code to get something done, just because you don’t understand what’s going on. That’s why frameworks are what I live by.

Don’t wait, get started with jQuery today.