The above answers hit everything by assigning the same values ββto two objects. The reason this may not be so clear. The second example is a little easier to explain. Each jQuery.fn member is associated with a return value of $ (). So, if you have done the following.
jQuery.fn.myFunc = function() { return 'blah'; }
You'll get
$('#blah').myFunc(); // returns 'blah'
Extend is a helper function that adds the provided object elements to the current object. jQuery uses these methods to create its own static ( jQuery.getJSON ) and "dynamic" ( $('.class').load() ) methods. This gives a good advantage of code separation during development. For example, ajax.js uses jQuery.fn.extend to add its loading methods, serialization, getScript, etc. And uses jQuery.extend to add methods like jQuery.ajax
source share