Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

click outside element jquery

    $(document).click(function (event) {
        var $target = $(event.target);
        if (!$target.closest('.modal-dialog').length && $('.modal-dialog').is(":visible")) {
            console.log("clicked outside the element")
        }
    });
 
PREVIOUS NEXT
Tagged: #click #element #jquery
ADD COMMENT
Topic
Name
5+4 =