Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

div outside click event jquery

window.addEventListener('click', function(e){   
  if (document.getElementById('clickbox').contains(e.target)){
    // Clicked in box
  } else{
    // Clicked outside the box
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #div #click #event #jquery
ADD COMMENT
Topic
Name
4+2 =