这个功能执行五六次就不正常了,没有报错,请问那里的问题。
`
jquery鼠标悬停滑动下拉菜单代码 - 站长素材
`
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
换一个写法,用mouseenter 和mouseleave,时间绑定在li上,这样才可以滑动到下面的框上:
<script type="text/javascript" src="jquery.js"></script>
这个被我替换成
<script src="https://code.jquery.com/jquer...
能正常执行无数次,只是鼠标离开没有收回子菜单。
要想鼠标离开收回子菜单,你需要为hover事件注册第二个函数。
$('#id').hover(function (){},function (){/当鼠标离开时/});