开发者

jQuery - what's jQuery plugin

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 t开发者_Python百科o get started?

TIA


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();


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/


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜