jQuery Drop Down Hover Menu

前端 未结 7 856
隐瞒了意图╮
隐瞒了意图╮ 2020-12-29 06:44

I\'m new to jQuery, I was hoping you guys could help me. I\'m trying to make a hover dropdown menu, but it\'s extremely buggy. Can you help me clean up my Javascript? Loo

相关标签:
7条回答
  • 2020-12-29 07:36

    Not sure if you care but you want to make sure that you run the .stop() method that way the animations dont build themselves up and run over and over. Here's an example

    http://jsfiddle.net/4jxph/1335/

    $(document).ready(function () {
        $(".hoverli").hover(
      function () {
         $('ul.file_menu').stop(true, true).slideDown('medium');
      }, 
      function () {
         $('ul.file_menu').stop(true,true).slideUp('medium');
      }
    );
    
    });
    
    0 讨论(0)
提交回复
热议问题