Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to detect click outside div

$(window).click(function() {
  //Hide the menus if visible
});

$('#menucontainer').click(function(event){
  event.stopPropagation();
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #detect #click #div
ADD COMMENT
Topic
Name
2+9 =