Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jQuery click outside

	$(document).click(function (event) {
        var target = $(event.target);
        if (!target.closest('.modal-dialog').length && $('.modal-dialog').is(':visible')) {
            console.log('clicked outside the element')
        }
    });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jQuery #click
ADD COMMENT
Topic
Name
3+1 =