Why in jQuery core.js isn’t extend defined as like this:
jQuery.extend = jQuery.fn.extend = function() {
...
}
and not as a prototype like:
jQuery.prototype.extend = jQuery.fn.prototype.extend = function() {
...
}
Presumably with the former, objects created from jQuery will not have the extend function.
Because
jQuery.fn === jQuery.prototypeIt is defined on the prototype. jQuery just decided it would be “cute” to alias the prototype to
.fnWhich is why