Reputation: 16226
I know jQuery.fn is just an alias of jQuery.prototype, but what does "fn" stand for? Does it have a full name?
For example, "formal name"? "formal namespace"? I've no idea.
Upvotes: 0
Views: 1382
Reputation: 10961
jQuery.fn
is just an alias for jQuery.prototype (which just saves us time when coding such jQuery.fn.init.prototype = jQuery.fn = $.fn
as such).
If you remember about prototypes
functions in JavaScript Objects, then it would make total sense.
Remember, JQuery
itself is an object.
This article can help you to better understand.
Upvotes: 2
Reputation: 140230
fn
as in f unctio n.
It is also the name of the formal parameter wherever a function is expected:
// Bind a function to a context, optionally partially applying any
// arguments.
proxy: function( fn, context ) {
Upvotes: 5