While JavaScript does not have a class concept, it is understandable that jquery is equivalent to a class in JavaScript, while $.extend adds a static method to the jquery class.
$.extend ({ function(A, b) {return (A +b);} ; function (A, B) {return (A-b);};}) // you can directly use the newly added jquery method Console.log ($.add (3,4)); // 7
But what about $.fn.extend?
Let us first understand what is Fn:$.fn equivalent to Jquery.prototype, then $.fn.prototype is equivalent to prototype to expand, add a member function for jquery. To refer to this function, you must create a new jquery object. This method of adding member functions to jquery is often used in the development of plug-ins, as in the following example:
$.fn.extend ({ function() { $ (this). Style.display = "None" ; };}); $ ("#hide_this"). hidden (); // $ ("") is a jquery object that calls its hidden method to make the element hidden.
Lay the groundwork: about $.fn and $.fn.extend.