2010
09.11

jQuery tip

I was scratching my head today trying to work out how to stop a rollover dissapearing when the mouse went over a nested element.

The answer was simple: use mouseenter and mouseleave instead of hover, mouseover/mouseout.
$('#someDiv').mouseenter(function(){
//do whatever
}
$('#someDiv').mouseleave(function(){
//do whatever
}

Digg this

No Comment.

Add Your Comment