Answers for "jquery check if clicked outside div"

2

click outside box jquery

$(document).click(function(){
 $("#try").hide(); 
});

$("#try").click(function(e){
  e.stopPropagation(); 
});
Posted by: Guest on September-10-2020
0

jquery check if clicked outside div

$(document).click(function() {
    alert('clicked outside');
});

$(".menuWraper").click(function(event) {
    alert('clicked inside');
    event.stopPropagation();
});
Posted by: Guest on December-17-2020

Code answers related to "jquery check if clicked outside div"

Code answers related to "Javascript"

Browse Popular Code Answers by Language