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.
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.