Skip navigation

Book Review: jQuery Cookbook

A collection of recipes for interactive web interfaces

jQuery Cookbook
Cody Lindley, ed.
Rating: 4 out of 5 stars
Price: $34.99

Who could have predicted that a compact bundle of JavaScript code would take the web user interface world by storm? That is exactly what jQuery has done. Remarkably small yet extremely versatile, anyone building interactive websites today has at least heard of this powerful library. Instead of reinventing browser detection workarounds, jQuery has already overcome those headaches with ease while simultaneously adding an elegant and easy to learn element manipulation and event management system.

However, without adequate documentation, learning the optimal ways to leverage jQuery would be a time-consuming, trial and error endeavor. Yes, the web is peppered with jQuery snippets and numerous quick video tutorials, but the time required to amass a "best of" collection would be an onerous task. Fortunately, O'Reilly has already done this heavy lifting by aggregating the work of 19 contributing authors skilled in the ways of jQuery goodness into the jQuery Cookbook. Over the course of 18 chapters, readers are presented with over 150 jQuery tips and best practices in a structured Problem, Solution, and Discussion format. Depending on the level of sophistication involved with each recipe, additional suggestions or cautionary notes are provided.

The chapters cover a pantheon of jQuery scenarios, beginning with the basics (traversing DOM elements and selecting form elements to creating arrays and extending jQuery with additional plug-ins) to going deeper with more complex capabilities (speed optimizations as well as determining and manipulating dimensions). jQuery's visual effect capabilities are explored in the Effects chapter, followed by chapters on managing events. Two more chapters on HTML Form manipulation and validation and a chapter dedicated to consuming and creating jQuery plugins provide an excellent primer on extending jQuery's abilities beyond its standard usage scenario. jQuery UI, Theming and AJAX are also detailed. The final two chapters on using jQuery in large projects and effective jQuery unit testing conclude the book with enough helpful recommendations to keep web application designers busy with plenty of jQuery ideas.

While I am not a big fan of books written by numerous authors due to continuity problems along with occasional redundancy, the book's editor has done an admirable job keeping these issues to a minimum. The ramp up from basics to advanced jQuery scenarios is tolerable and the selected tips are organized in a path that additively apply to later recipes in the book. Some of the sections are easy and barely more than a page while others are quite involved with multiple pages that may require a re-reading to fully absorb. As with most programming books, the best way to learn is to code along with the book. Tweaking the code to see how such changes impact the output is ideal and the Cookbook format facilitates this kind of interactive experimentation.

In summary, jQuery Cookbook provides a valuable resource to learn how to best utilize this efficient JavaScript library. While not the most comprehensive resource, it covers a variety of jQuery scenarios that the library would be most frequently employed to facilitate web UI interactions. Anyone interested in using jQuery in their web projects will be sure to discover nuggets of virtual gold in the pages of this cookbook.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.