Chapter 15. Ten Amazing jQuery Plugins

The jQuery library is amazing enough on its own, but it has yet another wonderful surprise up its sleeve: a marvelous plugin interface that makes new plugins or extensions to the library easy to add.

The plugins do many things, from changing the way your page looks to including audio and simplifying certain AJAX calls. This chapter contains a sampling of jQuery plugins I've found useful, but there are many more available at the jQuery main site (http://plugins.jquery.com/).

Using the Plugins

Each plugin is different, but the general approach to using them is the same:

  1. Visit the appropriate Web page.

    Check the jQuery main site for a list of jQuery plugins (http://plugins.jquery.com). You can download each plugin from the jQuery site or get a link to the plugin's home page, where you'll generally find more complete help information.

  2. Download the plugin.

    Most plugins are simply JavaScript files. Often other support material is available as well, including documentation, CSS files, and examples. Be sure to install the files you need in the working directory.

  3. Create a basic XHTML page.

    Check the documentation to see what elements you need. Most jQuery plugins modify or replace some existing element in the Web page.

  4. Add an init() function.

    Most jQuery functions (including plugins) require some sort of initialization function.

  5. Call the appropriate jQuery function.

    Most plugins just add new functions to jQuery. For the most part, you'll apply these functions to ...

Get JavaScript® and AJAX for Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.