jquery mouseout问题

前端之家收集整理的这篇文章主要介绍了jquery mouseout问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的html
<div id="parent">
<div id="child">cx</div>
</div>

当我使用jquery

$('#parent').mouSEOut(function(){
//something here
});

我想知道为什么当我的鼠标进入小孩div时,该功能会触发.我仍然在父母之内.
我希望mouSEOut功能只有当我离开父div而不是当我在任何孩子div时才触发

http://jsbin.com/esiju/<例 干杯

解决方法

这是mouseleave的事件.
$('#parent').mouseleave(function(){
//something here
});

http://api.jquery.com/mouseleave/

原文链接:https://www.f2er.com/jquery/179433.html

猜你在找的jQuery相关文章