认证高级PHP讲师
You should look like this
$(document).bind("click",function(e){ //通过e.target判断 }
e.target != "You click on the element that needs to be displayed" then execute hide()
$("#a").on("click", function(e){
if($(".class").is(":hidden")){ $(".class").show(); }else{ $(".class").hide(); } $(document).one("click", function(){ $(".class").hide(); }); e.stopPropagation();
});$(".class").on("click", function(e){
e.stopPropagation();
});
There is no problem with this answer, it is quite correct
You should look like this
e.target != "You click on the element that needs to be displayed" then execute hide()
$("#a").on("click", function(e){
});
$(".class").on("click", function(e){
});
There is no problem with this answer, it is quite correct