YouTip LogoYouTip

Misc Fn Extend

# jQuery.fn.extend() Method [![Image 3: jQuery Misc Methods](#)jQuery Misc Methods](#) ## Example Add two methods to the jQuery prototype ($.fn) $(function(){ $.fn.extend({check: function(){return this.each(function(){this.checked = true; }); }, uncheck: function(){return this.each(function(){this.checked = false; }); }}); // Use the newly created .check() method $("input[type='checkbox']").check(); }) [Try it yourself Β»](#) * * * ## Definition and Usage The $.fn.extend() function extends jQuery with one or more instance properties and methods (primarily for extending methods). **Note:** jQuery.fn is the prototype object of jQuery, and its extend() method is used to add new properties and methods to jQuery's prototype. These methods can be called on jQuery instance objects. * * * ## Syntax _$_.fn.extend( object ) | Parameter | Description | | :--- | :--- | | _object_ | Object type. The specified object to be merged into the jQuery prototype object. | * * jQuery Misc Methods](#)
← Docker Install PhpMisc_Each β†’