Five jQuery plugins that are a joy to use
Yesterday I discussed how to separate the jQuery plugin wheat from the chaff. Today, I offer a completely subjective and biased list of jQuery plugins to know and love.
This powerful library collects several useful utilities for manipulating forms - with or without Ajax. It adds eight separate methods to the jQuery namespace, but in some ways I prefer that to one overloaded method with complex invocation logic. The
ajaxSubmitmethods offer, respectively, complex or simple asynchronous form manipulation. Both implicitly support progressive enhancement. Additional methods allow you to serialize forms or individual form fields, clear or reset forms and retrieve form values. These methods offer a more convenient interface and a higher level of abstraction than built-in jQuery methods.
It sometimes seems like half the jQuery plugins out there offer some mix-and-match combination of tabs, lightboxes and image slideshows. The cycle plugin does, too, but it's lightweight and well-factored. The core library is only 6k compressed. If you want fancy transitions, you can get those for another 6k. Easing and meta-data can be layered on, too. The API, too, is modular. The options bundle for the library's single, overloaded
cyclemethod is a bit of a mishmash, but it lets you create endless slideshows, start-and-stop ones and everything in-between.
Live Query does one thing, and it does it well: It automatically binds and unbinds event handlers whether the associated content was in the native page, added via DHTML or loaded via Ajax. By offering a simple, intuitive wrapper to jQuery's own
unbindmethods, Live Query rewires a core part of jQuery without jumbling the API or losing the feel of jQuery's syntax.
A fork of Ext.js templates, this powerful plugin lets you build client-side templates that are as easy to work with as server-side ones. The default syntax leverages JSP-style variables, but you can rewire it with RegExes of your own. Either way, Templates lets you build on-the-fly DOM structures without concatenating strings by hand or building silly helper methods for tag construction. Build a template, throw a hash of data at it, and boom - instant DHTML.