Sunday, August 7, 2011

jQuery.extend(object) → jQuery

Can be used to add functions into the jQuery namespace. See <a href='Core/jQuery.fn.extend'>jQuery.fn.extend</a> for more information on using this method to add <a href='Plugins/Authoring'>Plugins</a>.

  • Object object : The object that will be merged into the jQuery object.

  • Example:
    Adds two functions into the jQuery namespace.
    jQuery.extend({
      min: function(a, b) { return a < b ? a : b; },
      max: function(a, b) { return a > b ? a : b; }
    });
    

  • No comments:

    Post a Comment