Yes, most jQuery functions are created like this.
Take a look at the sample code:
$.fn.someMethod = function() { return this.each(function() { do_something(this); }); };
So even you can use .each again, you should just use:
$(selector).someMethod();
not
$(selector).each(function() { $(this).someMethod(); });
xdazz
source share