[jQuery] return this.each
Hi, I am new to jQuery and have just started working with it, got to
say it's brilliant!
However I have had a bit of trouble getting my head around the
tutorials especially when it comes to making a plugin. It doesn't help
having only a basic understanding of Javascript!
Anyway I cracked most of it today, but I still don't understand the
significance of the subject aka:
//return this.each(function() {
this.html("");
this.hover(pause,resume);
//});
Now the above works without the return this.each so what exactly does
it do, I have yet to find a clear explanation! (Ignore the script
itself there's more too it. Basically it creates a news ticker (fading
out each item then fading in a new one) so it's only used one call per
page).
Also is the 'this' keyword gloabl? or am I right to set my own
variable var self = this;?
Thanks a lot.
Simon
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/