I have a jquery-script that triggers on mouseover on a div like this:
<div class="myDiv">
<span class="mySpan">text text text</span&g开发者_StackOverflow中文版t;
</div>
The problem is that it acts like mouseout when i hover over the text and I dont want that. I could put an invisible div over it all and trigger the moseover on that but I would like to keep it as simple as possible.
Any suggestions...?
You are looking for mouseleave / mouseenter not mouseout/mouseover
mouseleave fires when leaving the parent, while mouseout fires on children
精彩评论