[jQuery] Re: .each - how to write in my code?

2009-04-12 Thread Ricardo
That's unnecessary, you can use the .hover method directly on the anchors without the need for .each(), the iteration happens automatically: $("ul#menu li a").hover(function(){ // animate opacity to full $(this).find('span').stop().fadeIn('slow'); }, function(){ // animate opacit

[jQuery] Re: .each - how to write in my code?

2009-04-12 Thread Ralph Whitbeck
what jay said so for example instead of $("ul#menu a") try $("a", this) where you are selecting all the a tags in the context of this which represents the individual li tag as you iterate through the each loop. On Sun, Apr 12, 2009 at 12:18 PM, jay wrote: > > inside the each you need to referen

[jQuery] Re: .each - how to write in my code?

2009-04-12 Thread jay
inside the each you need to reference "this" or "$(this)" instead of referencing all of the elements again. On Apr 12, 11:38 am, adesign wrote: > Hello, > > I am very new to jQuery and don´t know how to write my code for every > item. > > Here is my code for a list with hover functions, I would