In jQuery, what is $ .fn. I mean?

In jQuery, that $ .fn. I mean? I looked at it on google but did not find specific examples.

$.fn.something = function{} 
+67
jquery jquery-plugins
Jun 22 '10 at 4:13
source share
3 answers

This allows you to extend jQuery with your own functions.

For example,

 $.fn.something = function{} 

will allow you to use

 $("#element").something() 

$.fn also synonymous with jQuery.fn , which can simplify Google searches.

See jQuery Plugins / Authoring

+124
Jun 22 '10 at 4:15
source share

It is described in detail here:

Why does jQuery do this: jQuery.fn.init.prototype = jQuery.fn?

But, nevertheless, $.fn is an alias for $jQuery.prototype

+8
Jun 22 '10 at 4:17
source share
+6
Jun 22 '10 at 4:15
source share



All Articles