views:

99

answers:

3

Hello folks, can somebody tell me what is jQuery plugin? I have used the jQuery library to build some small UI enhancements but i have no idea how to implement a plugin. Any suggestions on how to get started?

TIA

A: 

I recommend starting here: http://jqueryui.com/docs/Developer_Guide Or if you want a complete tutorial, try this page: http://bililite.com/blog/understanding-jquery-ui-widgets-a-tutorial/

WoLpH
+5  A: 

Probably the best resource you can read concerning jQuery plugin development is the Plugin Development Pattern by learningjquery.com:

http://www.learningjquery.com/2007/10/a-plugin-development-pattern

Of course it can't hurt to have a look at the official jQuery Plugin Development Guide and its equivalent from jQuery UI.

And to give you a (very) little insight... plugin development is really easy if you aren't completely new to jQuery. Basically, it is as simple as

$.fn.myPlugin = function() {
  // Plugin Action goes here
};

Which then could be used in the known way:

$(someSelector).myPlugin();
Mef
A: 

This is a decent screencast tutorial from nettuts

http://net.tutsplus.com/articles/news/learn-how-to-create-a-jquery-plugin/. you can also do a simple search of google

http://www.google.com/search?hl=en&client=firefox-a&hs=ySu&rls=org.mozilla%3Aen-US%3Aofficial&q=jquery+plugin+tutorial&btnG=Search that

will turn up many more.

Several more links can be found on the jQuery tutorial page.

Steve

Steve Robillard