Learning jQuery 1.3
3 comments | Posted: 7 March 09 in Books, by Nathan Smith
It’s been nearly two years since the first edition of Learning jQuery was published. In my review of the initial version, I highly recommended it to anyone wanting to learn more about jQuery. I am quite pleased to say that this update is equally as good, bringing the reader up to speed on all the improvements that have been made since. Karl Swedberg and Jonathan Chaffer have masterfully refined the examples in Learning jQuery 1.3 to reflect the latest code base.
Rather than summarize the book contents, as I did in my first review, I will instead highlight some of the big improvements that have been made to jQuery as of version 1.3, and how this book will help you better understand them.
One of the most notable improvements has been in the speed of CSS style selectors. Rather than doing a top-down pass at elements, the latest version of jQuery finds things via a bottom-up approach called Sizzle. This is similar to the way browsers apply stylesheets, and allows jQuery to be significantly faster.
Another key improvement, one that did not exist before, is the addition of
.live() effects. Essentially, this allows you to add event listeners on any currently existing elements in a page, as well as all future elements that match the criteria. This means that parts of a page dynamically updated via Ajax can also have enriched interactivity, without calling additional functions to re-parse the page. Under the hood, this is done via abstracted event delegation.
Another thing that has changed since the original book is that
.toggle() can now handle two or more functions, cycled through, rather than being limited to only two, as was the case with older versions of jQuery. This means that a single element can be the trigger for an unlimited events throughout a page.
Without specifically calling out every nuance that has been improved upon, suffice it to say that jQuery has continuously been refined and tuned for speed and browser compatibility over the past few years. Enough so, that even if you have the first edition, getting the latest version of this book will greatly benefit your development team, or even you as an individual if you work as a freelancer.
Discuss This Topic
Comments closed after 2 weeks.