fn.extend() Yöntemi;
jQuery.fn.extend() yöntemi yeni JQuery örnekleri oluşturmak için prototip üzerine bir nesnenin içeriğini birleştirmek için kullanılır.
Örnek
jQuery.fn.extend({
check: function() {
return this.each(function() {
this.checked = true;
});
},
uncheck: function() {
return this.each(function() {
this.checked = false;
});
}
});
$( "input[type='checkbox']" ).check();
Codepen Ön izleme
Kullanım şekilleri;
JQuery.fn.extend(object);