WIRN
WIRN

Reputation: 947

jquery mouseover question

I have a jquery-script that triggers on mouseover on a div like this:

<div class="myDiv">
    <span class="mySpan">text text text</span>
</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...?

Upvotes: 0

Views: 99

Answers (1)

David Houde
David Houde

Reputation: 4778

You are looking for mouseleave / mouseenter not mouseout/mouseover

mouseleave fires when leaving the parent, while mouseout fires on children

Upvotes: 1

Related Questions