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
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
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
3 matches
Mail list logo