John’s NOTES

John Tsekhmistro life notes

JQuery 1.3 released

January21

A good news jQuery 1.3. released on January 14,2009. There are quit many changes and improvments. 

These three are very important as for me:

1) jQuery now supports “live events” – events that can be bound to all current – and future – elements. Using event delegation, and a seamless jQuery-style API, the result is both easy to use and very fast:

Previously I use liveQuery plugin for this purpose.  Now, for examle I can simply use 
 $("p").live("click", function(){
  // doing something
 });

to bind a handler to an event (click) for all current – and future – element <p>.

.live – don’t fully replace functionality of liveQuery plugin, for examle .live doesn’t support the no-event style callback that liveQuery provides. Only event handlers can be bound with .live. But in many chanses  it’s all you need.

2) jQuery 1.3 has a brand new CSS selector engine – nicknamed ‘Sizzle‘.  So now jQuery performance for most selectors  coming in about 49% faster than its previous engine. This is especially surprising considering that the engine in 1.2.6 was already pretty fast.

3) HTML Injection was rewrited. All of the code related to injecting HTML into a document (such as the append, prepend, before, and after methods) has been overhauled.  The functionality provided is identical to what was in previous releases of jQuery but with the added benefit of being much, much faster (about 6x faster overall).

So now jQuery is  being much, much faster in many ways. (It is realy importnat cause many users still are using IE6 that is realy slow and dull browser ).

Additionally, Google has provided us with a copy of jQuery hosted on their servers. This copy of jQuery is automatically minified and gzipped – and served from Google’s fast edge cache servers. 

<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js”></script>

You can feel free to include the above html-code directly into your site and you will get the full performance benefits of a quickly-loading jQuery.

Bottom line is the fact that we have enough reasons to upgrade our sites jQuery engine.

posted under Programming

Email will not be published

Website example

Your Comment: