jQuery 怎么实现点击页面其他地方隐藏菜单?

<script>
    $(".eject_detailBtn").on("click", function(e){
        if($(this).next().is(":hidden")){
            $(this).next().show();
        }else{
            $(this).next().hide();
        }

        $(document).one("click", function(){
            $(".eject_detail").hide();
        });

        e.stopPropagation();
    });
    $(".eject_detail").on("click", function(e){
        e.stopPropagation();
    });
</script>

猜你喜欢

转载自blog.csdn.net/wangyanxin928/article/details/52004286