<p><a href="javascript:void(0)" class="a">菜单按钮</a></p><div class="menu"><a href="">百度</a></div>
$(".a").on("click", function(e){if($(".menu").is(":hidden")){$(".menu").show();}else{$(".menu").hide();}$(document).one("click", function(){$(".menu").hide();});e.stopPropagation();});$(".menu").on("click", function(e){e.stopPropagation();});
jQuery 怎么实现点击页面其他地方隐藏菜单? 做了个按钮点击时弹出菜单 想实现点击其他地方时隐藏弹出的菜单