Streaming live at 10am (PST)

Autoclose on click outside modal


#1

Hello.

How can i automatically close a modal when i click outside of it? I dont want to use a close button but instead a click trigger outside the modal. I tried doing on the body element but it does trigger when opening them odal which is not what i want.

Thanks


#2

hey @pagios Have a look here;

Works well. You may also want to go through the topic below for a more advanced setup.


#3

Hi @pagios!
I solved the problem by putting the Modal Window div outside the Modal Wrapper div with an higher z-index.
Then the trigger click on the Modal Wrapper to transform itself and the Modal Window to their original settings.
Ciao!
Pier


#4