I\'m looking at a jQuery plugin, which has a single function. After setting up the appropriate defaults though a constructor argument the function defines a couple of helper fu
.each
returns the elements it was called on, so in this case, it is probably to maintain the ability of methods to be chained on that selector. That means that if the plugin'S method is called foo
, you should be able to do
$("mySelector").foo().show();
Because foo
returned the result of .each
which is basically $("mySelector").
Hope that made sense.