Answer the question
In order to leave comments, you need to log in
How can I make the modal window close?
I made my modal window, like alert, for my needs, only such a moment, I need to implement if I click on an area that does not enter the modal window, then it would close. In principle, how to do a normal modal window when closing. That is, there or when you click on the button or click on the area outside the modal window. This is what I need to implement. Deleting the object did not help me
Here is my example https://jsfiddle.net/hollanditkzn/nwajvdrr/43/
Now it closes when click on no
Answer the question
In order to leave comments, you need to log in
Already wrote somewhere. look at how modals from "well-known manufacturers" are implemented.
Alternatively, make a layer that rolls out along with the pop-up, with a lower z-index, by clicking on it - the action is the same as when clicking on the close button.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question