What are the benefits? This seems like a tricky way to do things, so why not just take a simple approach to creating such a plugin as described in jQuery Plugins :
Please see here: http://jsfiddle.net/e2aYH/11/
Compared with..
jQuery.fn.placeKitten = function( options ) {
The author of this work also continued to argue that in any case, he would not have bothered with the jQuery plugin, and they should never be used, but instead make your code โmodularโ. What would it mean if not through the jQuery plugin? and if it means not using jQuery at all, I see a lot of advantages and effectiveness when using jQuery, so I also donโt understand this point.
javascript jquery jquery-plugins design-patterns
GONeale Sep 05 '13 at 2:35 am
source share