Coding with Jesse

jQuery tutorial on IBM.com

April 11st, 2007

I wrote a jQuery tutorial which was just put live on IBM DeveloperWorks today: Simplify Ajax development with jQuery.

I discuss a lot of the core functionality and philosophy of jQuery, including an introduction to writing plugins. So if you've heard of jQuery but haven't really decided if you want to use it, or if you've started to use it and want to see what it's capable of, I think you might enjoy the article.


Interested in web development? Subscribe to my newsletter!

Comments

1 . nitinpai at 2007-04-11T16:10:01.000Z

nitinpai

Hi Jesse,
Congrats on getting your article live in the IBM space. I have been reading your blog since a long time now. I loved the article on JQuery and I intend to use JQuery since through your explanation I am finding it more easier than DOJO.

Are you a full time blogger? I wonder how do you manage to write so much good content and at the same time constantly learn new things. Can you tell me something for this since I find it somewhat difficult managing my work and blogging schedules.

Thanks!

2 . Darlene Tate at 2007-04-11T17:26:02.000Z

Darlene Tate

Hi Jesse,

Congrats on getting your tutorial on IBM! Can you send me the a link to where it is? I'd like to link to it from my website. My website contains links to learning resources, tutorials, free online classes, etc. for beginning web professionals. Thanks and keep up the good work.

Darlene

3 . Emil Stenström at 2007-04-11T21:42:10.000Z

Emil Stenström

Just a quick note, the above comment from "Darlene Tate" is spam, I got the same comment but with one or two words different.

Congratulations on the IBM tutorial, I'm using jQuery in a project right now so you're right on time!

4 . Darlene Tate at 2007-04-16T04:41:25.000Z

Darlene Tate

Hello Jesse,

Regarding Emil's comment that my note is spam. I don't know why he is saying this. I have never emailed him and I would never send spam to anyone! I merely wanted to put your link on my website because I want my website to provide beginning web developers/designers with free resources. I honestly don't know what he is talking about. Take care.

Darlene

5 . awflasher at 2007-04-18T15:34:39.000Z

awflasher

I love jQuery's philosophy very very much :)

Good stuff~

6 . Jason Barnabe at 2007-04-26T04:20:06.000Z

Jason Barnabe

It's fairly easy to make something look incredible by avoiding the things that are not so incredible. What are some problems you experienced using jQuery?

From the examples you give, it appears that jQuery trades readability for brevity. For example, the code in listing 1:

$('#external_links a').click(function() {
return confirm('You are going to visit: ' + this.href);
});

To someone without knowledge of jQuery, the "$" and "click" functions don't act as their name suggests; "$" suggests nothing and "click" suggests that the click event handler will be fired rather than defined. In my opinion, if the "$" were renamed "select" and the click function became a click property, it would be made more clear and only slightly less brief.

select('#external_links a').click = function() {
return confirm('You are going to visit: ' + this.href);
};

7 . Mei at 2007-05-17T22:07:39.000Z

Mei

Great tutorial.

I've been reading a lot lately trying to learn JS and jQuery, and this is one of the best.

I read somewhere that jQuery is rather 'lightweight' when it comes to Ajax etc. What do you think? Is it up there with Prototype et al?

8 . Jesse Skinner at 2007-05-17T22:18:20.000Z

Jesse Skinner

@Mei - Well, if by lightweight you mean lacking in features, then I'll have to say no. jQuery is designed to do the basics extremely well, but also makes it easy to add plugins. This way, if you want to do some extreme script.aculo.us-style animations and interfaces, you can get the Interface plugin for jQuery:

http://interface.eyecon.ro/

Likewise, if there's something else you want to do with jQuery, chances are you can find a plugin for it:

http://docs.jquery.com/Plugins

and if not, you could always write one yourself :)

9 . Mei at 2007-05-21T09:20:29.000Z

Mei

Thanks for the answer!

10 . Jeremy Martin at 2008-02-07T22:27:57.000Z

Jeremy Martin

Awesome article - very informative. I think that (arguably) jQuery's best feature is its extensibility. The ease of plugin creation was surprising to me.

I actually just finished creating my first plugin and made a little tutorial out of it (http://jmar777.blogspot.com/2008/02/building-your-first-jquery-plugin-that.html). You seem to have a solid grasp on the matter and I'd love to hear any feedback on it.

11 . Rwbolov.ru at 2009-04-08T06:50:09.000Z

Rwbolov.ru

This idea is not new for internet society, but it also have it's own place. If it will be developed in future with some new features - very good. I'm an old user of internet in I want a good sites and blogs. Good luck