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

后端 未结 4 696
盖世英雄少女心
盖世英雄少女心 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-30 17:23

    On opening of the menu, create a transparent overlay div of the same width and height of the window. On click of that div, close the menu and destroy the div.

提交回复
热议问题