[jQuery] Re: Shortest possible method of adding/removing class on mouseenter/leave without a plugin

2010-01-13 Thread MorningZ
i don't understand the .each part jQuery is already going to do that $('#nav li').bind('mouseenter mouseleave', function() { $ (this).toggleClass('hover'); }); *should* be equiv, although i must say that's untested and how about *zero* jQuery code and just using CSS's :hover pseudo?

[jQuery] Re: Shortest possible method of adding/removing class on mouseenter/leave without a plugin

2010-01-13 Thread seasoup
Hey MorningZ, Yeah, sorry, the .each was in there because I actually have more code in the $('#nav li).each(... CSS :hover doesn't work in ie6, ie7 on li nodes. Josh Powell On Jan 13, 11:00 am, MorningZ morni...@gmail.com wrote: i don't understand the .each part  jQuery is already going

[jQuery] Re: Shortest possible method of adding/removing class on mouseenter/leave without a plugin

2010-01-13 Thread Amos King
css hover is not supported on some browsers. Amos On Jan 13, 1:00 pm, MorningZ morni...@gmail.com wrote: i don't understand the .each part  jQuery is already going to do that $('#nav li').bind('mouseenter mouseleave', function() { $ (this).toggleClass('hover'); }); *should* be equiv,