Skip to content

Instantly share code, notes, and snippets.

@StevenBlack
Created April 6, 2010 22:41
Show Gist options
  • Select an option

  • Save StevenBlack/358216 to your computer and use it in GitHub Desktop.

Select an option

Save StevenBlack/358216 to your computer and use it in GitHub Desktop.

Revisions

  1. StevenBlack revised this gist Apr 8, 2010. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions jquery.pluginOutline.js
    Original file line number Diff line number Diff line change
    @@ -8,8 +8,8 @@ function($)
    $.fn.myPlugin.settings = $.extend( {}, $.fn.myPlugin.defaults, options );

    // Go through the matched elements and return the jQuery object.
    return this.each( function()
    {
    return this.each( function() {

    });
    };
    // Public defaults and settings.
  2. StevenBlack revised this gist Apr 8, 2010. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions jquery.pluginOutline.js
    Original file line number Diff line number Diff line change
    @@ -5,19 +5,22 @@ function($)
    $.fn.myPlugin = function( options )
    {
    // options.
    options = $.extend( {}, $.fn.myPlugin.defaults, options );
    $.fn.myPlugin.settings = $.extend( {}, $.fn.myPlugin.defaults, options );

    // Go through the matched elements and return the jQuery object.
    return this.each( function()
    {
    });
    };
    // Public defaults.
    // Public defaults and settings.
    $.fn.myPlugin.defaults = {
    prop: 'some value'
    };
    $.fn.myPlugin.settings = { };


    // Private functions.
    function func()
    function myFunc()
    {
    return;
    };
  3. StevenBlack revised this gist Apr 6, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion jquery.pluginOutline.js
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@ function($)
    };
    // Public defaults.
    $.fn.myPlugin.defaults = {
    property: 'value'
    prop: 'some value'
    };
    // Private functions.
    function func()
  4. StevenBlack created this gist Apr 6, 2010.
    29 changes: 29 additions & 0 deletions jquery.pluginOutline.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    // Skeleton jQuery plugin

    function($)
    {
    $.fn.myPlugin = function( options )
    {
    // options.
    options = $.extend( {}, $.fn.myPlugin.defaults, options );

    // Go through the matched elements and return the jQuery object.
    return this.each( function()
    {
    });
    };
    // Public defaults.
    $.fn.myPlugin.defaults = {
    property: 'value'
    };
    // Private functions.
    function func()
    {
    return;
    };
    // Public functions.
    $.fn.myPlugin.func = function()
    {
    return;
    };
    })(jQuery);