Learning jQuery 1.3 Review

This is a review of Learning jQuery 1.3, written by Jonathan Chaffer and Karl Swedberg, published by Packt. Packt sent me a copy of the book for review.

Learning jQuery 1.3 is a rewrite of Learning jQuery, which was written by Jonathan and Karl, too, and where I was involved as a technical reviewer. At the time it turned out to be much more work then expected, so I’m happy to just do a normal review this time.

Of particular interest to me was the 1.3 aspect of the book. jQuery 1.3 offers a few new features, like the addition of the live-method, which the book covers around page 142:

An often superior alternative was introduced in Chapter 3: We can implement event delegation, actually binding the event to an ancestor element that never changes. In this case, we’ll attach the click handler to the document using .live() and catch our clicks that way:

$(document).ready(function() {
  $('.term').live('click', function() {
    $(this).siblings('.definition').slideToggle();
  });
});

The .live() method tells the browser to observe all clicks anywhere on the page. If (and only if) the clicked element matches the .term selector, then the handler is executed. Now the toggling behavior will take place on any term, even if it is added by a later AJAX transaction.

In general though, the book isn’t the right place to look for exhaustive descriptions of new features introduced in 1.3. The release dates of 1.3 and the book were quite close, and some features, like those in 1.3.2 to the :visible selector, were released after the book went to print.

On the other hand, the book is a great tutorial book. After the first chapter, it can be read cover-to-cover, or starting with any specific chapter. For example, if you need to write your own form validation, skip to chapter 8, Forms with Function. Each chapter starts with small snippets, and ends up with a full example for a certain function, each step illustrated with enough images to follow along without having to sit at a computer during reading.

Even if you already have the first edition of the book, its still a good investion when you want to get back to learning some of the things you may have skipped in the past.

-Jörn

No more comments.
  1. Hervé

    Hello,

    I also have the book and find it a good book.
    As a complement, I recommend its companion:
    jQuery UI 1.6: The User Interface Library for jQuery
    http://www.packtpub.com/user-interface-library-for-jquery/book

    bye,
    Hervé

  2. jQuery has continuously been refined and tuned for speed and browser compatibility over the past few years. Very well done, keep it up…