Sunday, August 7, 2011

jQuery.fn.extend(object) → jQuery

Can be used to add functions into the to add <a href='Plugins/Authoring'>plugin methods (plugins)</a>.
Object object : The object that will be merged into the jQuery object.

Example:
Adds two plugin methods.
jQuery.fn.extend({
  check: function() {
    return this.each(function() { this.checked = true; });
  },
  uncheck: function() {
    return this.each(function() { this.checked = false; });
  }
});

No comments:

Post a Comment