joaopereirawd / animatedModal.js

animatedModal.js is a jQuery plugin to create a fullscreen modal with CSS3 transitions. You can use the transitions from animate.css or create your own transitions.
MIT License
962 stars 207 forks source link

Close modal when user clicks background #42

Open Taewa opened 7 years ago

Taewa commented 7 years ago

Hi, thanks for nice plugin.

Is there way to close the modal when user clicks background?

I tried when user clicks #myPopup then trigger .close-myPopup.click() However, it closes even .modal-content is clicked. I want to avoid this.

Any solutions or options?

Thanks.