Michael,
Rob, I think you left out the return statement that you meant to put in.
:-) Whoops, thanks!
(Outstanding explanation, BTW!)
And thanks again :-) took a while to put it into rambling words. Is there a decent article somewhere on docs.jquery.com or someone's blog which explains what 'this' is and when? It's such a common confusion that it really needs an obvious, short description somewhere. --rob On 7/25/07, Mike Alsup <[EMAIL PROTECTED]> wrote:
:-) Mike, I just reread your email and see that you pointed this out already! Sorry! Mike On 7/25/07, Mike Alsup <[EMAIL PROTECTED]> wrote: > > It would have been far better if "each" passed the DOM element as > > an argument to the inner function, instead of using "this": > > It does pass the element, so if you prefer you could write code like: > > $('.stuff').each(function(index, element) { > element.style.visibility = 'hidden'; > });
-- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 "There's a whale there's a whale there's a whale fish" he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.