jQuery Plugin Pattern 2.0

jQuery Plugin Pattern 2.0

Hi everyone,

After a long time I've finally written up my latest plugin pattern that allows to namespace your plugin, use traditional OOP method conventions, as well as maintaining full backward compatibility with jQuery's traditional plugin convention.

This means now you can write plugins that can be used like $(selector).pluginName.object.method() or even as $(selector).pluginName(args) or even as $(selector).pluginName(args).method() and of course you can pass arguments to your methods as well .  Have it anyway you want, nothing is stopping you from having something as granular and complex as $(selector).pluginName.object.object.object.method(args).object.method(args).method(args).fadeIn("slow").

Read more about it at my blog jQuery Plugin Pattern 2.0 .

This pattern improves upon my original attempt at this, and so far I know of no known issues.  Feel free to discuss.

Milan