Jquery: drop down menu wont disappear after clicking outside of menu

后端 未结 4 708
盖世英雄少女心
盖世英雄少女心 2020-12-30 17:02

I\'m new to jquery and I\'m looking at google\'s code to create their \'More\' button. I\'ve got it working atm but the only way to make the drop down disappear is to click

4条回答
  •  不知归路
    2020-12-30 17:26

    You could add this too , so the user don't have to click

    $("body:not(.menu)").hover(function(){ $(".menu").find('.active').removeClass('active');})
    

提交回复
热议问题