$.fn.simplePlugin101 = function(arg1, arg2/*, ...*/) {
    // Plugin's implementation...
};

$('h1').simplePlugin101('test', 1);

$.fn.simplePlugin101 = function() {
    this.slideToggle();
    // “this” is a jQuery object where all jQuery methods are available
};

jQuery.fn.simplePlugin101 = function(arg1, arg2/*, ...*/) { 
    var $buttons = jQuery('button');
    // ...
};


(function($) {
    var callCounter = 0;

    function utilityLogMethod(message) {
        if (window.console && console.log) {
            console.log(message);
        }
    }

    $.fn.simplePlugin101 = function(arg1, arg2/*, ...*/) {
        callCounter++;
        utilityLogMethod(callCounter);
        return this;
    };
})(jQuery);


(function($) {
    'use strict';

    $.fn.leakingPlugin = function() {
        x = 0;// there is no “var x” declaration, so an error is thrown when executed
    };
})(jQuery);

$('div').leakingPlugin();
