jQuery extend $.fn and calling method syntax
- by MBax
I understand that you call a method like this when you are extending $.fn.
( $ == jQuery )
//$("div").myMethod();
$.fn.extend({
myMethod: function(){...}
});
And like this when you extend the jQuery Object:
//$.myMethod2();
$.extend({
myMethod2: function(){...}
});
But I don't quite understand what the $() is doing here:
$().functionName({
something: 'something'
}).myMethod();
Does it have to do with the fact the method is being called including the function name?
Thanks in advance and hope this makes sense.