Creating a jQuery Plugin June 24th, 2014
$.fn.makeTabsFor = function(){...}; // Create method
$(tabs).makeTabsFor(content); // Call method
$.fn.makeTabsFor(content); // Call method when no selector is used
When your plugin code gets called, it’s called in the context of the selected jQuery object, so the method “this” becomes the jQuery object itself.