Duplicate:
Yes it is. Below is the references which I searched on stack overflow.
What I am looking for:
Actually I am making custom modal without using bootstrap. Overall my code is working fine and below is the live example of it:
$(window).click(function(e){
let classname = e.target.className;
if(classname == "ah-modal-wrapper") {
e.target.style.display = 'none';
}
});
Problem is when I select my inner text of modal and release my selection outside from modal its hide / close the modal. But my need is when I click outside of a modal then modal should closed immediately. Which is working fine. but I don't want that modal closed while releasing the mouse click outside from modal.
For more clearance please review below example: