I have a Div in which there is a text input, like this:
<div id="parentDive" class="parent">
<input id="textbox"></input>
</div>
I have assigned a functionality to the Div mouseover event and mouseout event by means of JQuery, but when I move my mouse over the text input, it calls mouseout event while it’s in the DIV.
How to solve this problem? Should I send the event to the parent? How?
Use the jQuery
.hover()method instead of bindingmouseoverandmouseout:Live test case.
The
.hover()is actually binding themouseenterandmouseleaveevents, which are what you were looking for.