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
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
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/
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();
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
will turn up many more.
Several more links can be found on the jQuery tutorial page.
Steve