Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery on click outsile hide div

$(document).mouseup(function(e) {
  var element = $(".searchbox-holder");

  // if the target element is not expected element
  if (!element.is(e.target) && element.has(e.target).length === 0) {
      element.fadeOut("slow");
  }
});
 
PREVIOUS NEXT
Tagged: #jquery #click #outsile #hide #div
ADD COMMENT
Topic
Name
8+3 =