Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Hide a div on clicking outside it with jquery

$(document).click(function() {
    var container = $("#container");
    if (!container.is(event.target) && !container.has(event.target).length) {
        container.hide();
    }
});
Source by www.techiedelight.com #
 
PREVIOUS NEXT
Tagged: #Hide #div #clicking #jquery
ADD COMMENT
Topic
Name
3+4 =