I have some HTML menus, which I show completely when a user clicks on the head of these menus. (我有一些HTML菜单,当用户单击这些菜单的标题时,它们会完整显示。) I would like to hide these elements when the user clicks outside the menus' area. (当用户在菜单区域之外单击时,我想隐藏这些元素。)
Is something like this possible with jQuery? (jQuery可能会发生这种情况吗?)
$("#menuscontainer").clickOutsideThisElement(function() {
// Hide the menus
});
ask by community wiki translate from so