Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check event target jquery outside

$(document).on("click", function (event) {
  // If the target is not the container or a child of the container, then process
  // the click event for outside of the container.
  if ($(event.target).closest("#container").length === 0) {
    console.log("You clicked outside of the container element");
  }
});
Source by jsdev.wikidot.com #
 
PREVIOUS NEXT
Tagged: #check #event #target #jquery
ADD COMMENT
Topic
Name
4+4 =