(function ($) { $.fn.pluginName = function () { // plugin code return this.each(function () { // do something to each item }); } })(jQuery);