First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

A few weeks ago I started to play around with jQuery and I already banged my head against some small gotchas of the framework. But a comment made by Jake Scott opened my eyes:

I recommend you read (if you haven't already) Manning jQuery in Action, its the best book on Javascript ever :)

jquery_logoEven if I might not second the "best book on Javascript ever" part of the comment, I got the book yesterday afternoon and I already read 4 chapter of the book while on the train. I've to say that the books is really well written and easy to understand. And I think I have a crush on jQuery.

I've been using Javascript since a very long time - probably it's one of the first programming language I used when I started developing for the web in '96 - but this framework puts together all the good things from the various programming languages used on the web and everything become so easy to write, and in less time.

You have a bit of CSS, a bit of fluent interfaces (they call it action chaining), you've got also a little feeling of Linq, you have a tiny library (only 15Kb minified and packed) that is very easy to extend with extension methods, and a huge ecosystem of already available plugins. And of course you have Ajax and animation effects.

One of my favorite thing is the way jQuery abstracts the onLoad event of the page:

    alert("I'm loaded, but the images not yet");

The cool thing is that the function defined runs when the DOM tree has been loaded, not, as with the standard onLoad event, when all the element of the page (including all the images) have been loaded. This avoids that a image that takes too long delays the execution of start-up scripts as sometimes happens now when the Lightbox effect doesn't work because some external images or scripts are slow to load.

So, from my first impressions: CSS + Javascript + Linq + fluent API + anonymous methods = jQuery.

OK, there are some gotchas, but which framework doesn't have some?

I'm starting to use it for the UI of the new features in Subtext 2.0 and I might add some goodness to my blog. Let's see if it turns in real love.

Technorati Tag:
posted on Thursday, April 17, 2008 1:49 PM

Comments on this entry:

# re: Having a crush on jQuery

Left by Si Philp at 4/17/2008 2:05 PM

I like jQuery, but I tend to mix and match. I also like
Another nice little bit of javascript I have found is this bad boy, rounds corners, use it on admin areas, should check it out Curvy Corners. There is also a link there that has Curvy Corners jQuery plugin :)

# re: Having a crush on jQuery

Left by Diego Guidi at 4/17/2008 3:12 PM

I've started reading the same book, and looks cool :)

# re: Having a crush on jQuery

Left by Yehuda Katz at 4/17/2008 11:04 PM

Glad that you like the book! We worked hard to make it readable and usable (especially with the lab pages, which I definitely recommend you check out).

Feel free to email me at [email protected] (or ping me at the same on GTalk) if you have any questions.

# re: Having a crush on jQuery

Left by Simone at 4/19/2008 2:47 PM

What a honor, the author of the book himself :)
Yes, the Lab is great, it allows you to play around without the need to build a full sample yourself.

# re: Having a crush on jQuery

Left by Yolanda MooTan-da at 5/2/2008 10:39 PM

Have you looked at MooTools? Just out of curiosity.

Comments have been closed on this topic.