导航hover延迟

2023-05-16

 $(function(){

  var hoverTimer, outTimer;
        $(".nav li").hover(function () {
            var _this = $(this);
            clearTimeout(outTimer);
            hoverTimer = window.setTimeout(function () {
                _this.find('a').addClass("active");
                _this.find(".addnavul").stop(true, true).slideDown(500);
            },0);
        }, function () {
            clearTimeout(hoverTimer);
            $(this).find('a').removeClass("active");
            $(this).find(".addnavul").stop(true, true).slideUp(500);

        });
      


 })

 

转载于:https://www.cnblogs.com/sdsd123/p/11605840.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

导航hover延迟 的相关文章

随机推荐