One of the things that makes jQuery so powerful is that it can be “easily” extended via a plugin.
You have some experience with Plugins for Photoshop, or another application. But you’re probably wondering “how does this apply to something like jQuery, which is just software code?”
Well, plugins are designed to extend the functionality of a piece of software. Maybe it is something the original author didn’t think about, or it’s something that not everyone needs, but a large number of people do, so someone wrote a plugin to add that functionality.
Why use a Plugin
You see, that is the basic idea behind a plugin. Its something that (most likely) a large number of people will need, but not most. So we don’t want to add it to a product because it will take more time to download, time to develop & maintain, etc.
And for a website, this means more time to download, and more bandwidth used. So instead, we add it only when we need it. This way we get to save on bandwidth.
They can simplify life, by instead of making (potentially) huge amounts of code to for you to write, you can simply call a function, with a few parameters, and have an awesome set of code to use.
What can Plugins Do
Anything you can do in writing jQuery Code can be put into a plugin.
There are many existing plugins out there. Sometimes, several plugins exist that do the same thing. Some popular examples would be plugins to manage forms and image slideshows.
Form handler plugins can be used to do everything from validation, send form via AJAX automatically, and more.
A slideshow allows a series of images to become a slideshow. It will allow people who click on an image to expand it, and then let people navigate between images. Often the plugin will provide a transition effect, or more than one, to change the image.
Where to Find Plugins
Some of the largest, most complex, plugins are written by the jQuery team themselves. These include jQueryUI and jQueryMobile. Links to these can be found from the jQuery site.
Likewise, there is a link on the main menu of the jQuery site that is a repository of plugins you can download and use. This includes things like progress indicators, UI plugins, image handling, form handling and more. At this time, there are over 1700 plugins in the repository.
You can also always use Google to search for the right plugin for you.
Writing Plugins
There is nothing “special” about a plugin. Like jQuery itself, plugins are simply written in JavaScript. There is some special formatting that needs to be done.
We are not going to look into how to develop our own plugins, at this time. However, we will look at two of the major plugins, jQueryUI and jQueryMobile over the next few weeks.
jQuery Plugins was originally found on Access 2 Learn
One Comment
Comments are closed.