H
H
hollanditkzn2018-02-22 16:44:30
JavaScript
hollanditkzn, 2018-02-22 16:44:30

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

1 answer(s)
A
Andrew, 2018-02-22
@hollanditkzn

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 question

Ask a Question

731 491 924 answers to any question