When I started writing reusable plugins at work, I've read a couple of tutorials first, but then found this one:
http://www.learningjquery.com/2007/10/a-plugin-development-pattern All my plugins since then are based on that pattern, and I strongly felt I've understood every little nuance of why the pattern was like it was. For me, it really is *the* reference on best practices for jquery plugin patterns. The only line that is outdated on that 2+ year old article is the one about how to include the metadata-plugin (which I strongly recommend). Original in the article: var o = $.meta ? $.extend({}, opts, $this.data()) : opts; Updated line: var o = $.metadata ? $.extend({}, opts, $this.metadata()) : opts; On Jan 14, 4:14 pm, Amos King <amos.l.k...@gmail.com> wrote: > I want to start making parts of my code into plugins, but I'm not sure of > the best way to approach it. If anyone has any ideas on how to make this a > little better that would be great. > > http://gist.github.com/277243 > > Thanks, > Amos > > -- > Amos Kinghttp://dirtyInformation.comhttp://github.com/Adkron > -- > Looking for something to do? Visithttp://ImThere.com