If you have been following up with the new developments in javascript over the last year or two, then chances are you have heard of the Prototype, script.aculo.us, or MooTools javascript libraries.

These javascript libraries allow you to add special effects (fading text, drag-and-drop boxes, to name a few) to elements on your web page, as well as enhance the way you can make AJAX requests.

I stayed away from these libraries because I had heard that Prototype, and script.aculo.us really degraded the performance of your web page. I am not very patient when waiting for a web page to load and do not expect people visiting my web site / project to be either.

However when planning a recent project I started working on, I was browsing Digg and came across an article for the then latest jQuery 1.1.3 release which boasted that it had the best performance in Internet Explorer, with moderate performance in FireFox and Safari.

Impressed by this I decided I would try it out and see if I could integrate some AJAX and highlighting effects into the project I was working on.

I can definitely say that I am thoroughly impressed with the ease in which you can use jQuery, in less then two days I had AJAX and highlighting effects fully integrated into my project. You can not even notice any performance degradation, the pages run very fast.

Although I love this, I think I am addicted to the chaining that you can have in jQuery. Where you would normally have a bunch of different declarations to modify an element, you can apply a bunch of changes to a single element in a chain like so:

$("#modified-id")
.mouseover(function() { $(this).addClass(‘hover’); })
.mouseout(function() { $(this).removeClass(‘hover’); });

The jQuery library itself takes up around 20kb (compressed version) so that is not such a huge bandwidth increase. jQuery can also run alongside Prototype, and script.aculo.us, so if you need those libraries you can enjoy the benefits of both libraries.

There is a huge amount of plugins available already for jQuery, not to mention it is very easy for you to write your own.

All in all I find jQuery very pleasant and powerful to use.

Read more about jQuery.

Until next time,
-ResidentCodeMonkey

Leave a Reply

Your email address will not be published. Required fields are marked *