Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jquery slideDown()兼容性与sticky js_Jquery_Drop Down Menu_Sticky - Fatal编程技术网

jquery slideDown()兼容性与sticky js

jquery slideDown()兼容性与sticky js,jquery,drop-down-menu,sticky,Jquery,Drop Down Menu,Sticky,在我的网站上有一个下拉菜单,鼠标悬停滑动。jQuery脚本: $(document).ready(function(){ $('ul.list li').hover(function () { clearTimeout($.data(this,'timer')); $('ul', this).stop(true,true).slideDown(400); }, function () { $.data(this,'tim

在我的网站上有一个下拉菜单,鼠标悬停滑动。jQuery脚本:

$(document).ready(function(){
      $('ul.list li').hover(function () {
         clearTimeout($.data(this,'timer'));
         $('ul', this).stop(true,true).slideDown(400);
      }, function () {
        $.data(this,'timer', setTimeout($.proxy(function() {
          $('ul',this).stop(true,true).slideUp(400);
        }, this), 100));
      });
      // here is the place for sticky code
    });
它工作得很好。但现在我想添加粘性插件。我在粘贴代码的地方放了下面一行:

$("#sticker").sticky();
现在菜单的子菜单不会向下滑动,而是立即出现。为什么会这样


更新:在JSFIDLE上,它的工作原理与预期的一样。。哈哈

我刚刚注意到,在我的站点中,“贴纸”被包装到“贴纸粘性包装纸”中两次,而在JSFIDLE上只有一次。但我认为这无关紧要。。
那么,有什么想法吗?

你能添加jsiddle示例吗?添加Jquery.js和Jquery.sticky.js都像吗?你能添加jsiddle示例吗?添加Jquery.js和Jquery.sticky.js都像吗