How do you do a JQuery slideDown when the 2 divs are overlapping?
Let's say there's a big div.
onmouseover, a small div, which is on absolute, slidesDown(), in front of the big div.
onmouseout, the small div hides().
Let's say I move my mouse to 开发者_JAVA技巧the small div after it dropped down. The problem is...when it gets there, there is a "twitch". That's because the browser sensed mouseout from the big div and a sudden mouseover. When I stop the mouse, the browser senses that I'm still on my big div (with the small div on top), and finally slidesDown the small div.
As I move my mouse around the small div, it twitches.
You can use jQuery .hover() method to attach event handlers. This problem occurs because of mouse event bubbling, IE has two special events called "mouseenter" and "mouseleave" which does not fire if you move your mouse in child elements, for more info on this you can checkout this link:
MouseEvents - QuirksMode
Hope it helps.
精彩评论