$.fn refers to the jquery namespace, plus the methods and properties on the FN, which are valid for each jquery instance.
If the extension $.fn.abc (), or $.FN.ABC () is a method of extending an ABC to jquery, then each jquery instance can invoke the method.
For example: $ ("#div"). ABC ();
jquery provides two methods for development, namely:
Jquery.extend (object); To extend the jquery class itself, add a new method to the class.
Jquery.fn.extend (object); Adds a method to a jquery object.
Example:
$.extend ({ add:function (b) {return a +b;}}) Can be understood as a static method, the actual invocation of $.add (3,4); // 7
$. ("#btn1") generates an instance of the jquery class.
Jquery.fn.extend (object); To extend the jquery.prototype is to add "member functions" to the jquery class, and the jquery instance can use "member functions".
For example to develop a plugin, make a special edit box when he is clicked, then alert the current edit box contents
$.fn.extend ({alertwwhileclick:function () {$ (this). Click (function () { alert ($ ( this). Val ()); })})
Example of the use of jquery $.fn