vodkabears / Remodal

No longer actively maintained.
http://vodkabears.github.io/remodal/
MIT License
2.75k stars 771 forks source link

Add modal to DOM only when opened #199

Closed yaniv691 closed 8 years ago

yaniv691 commented 8 years ago

Hi,

My page has a lot of modals, causing the page to load slowly because all the modals are add to the DOM.

Is there a way to add the modal to the DOM only when opened, and remove it from the DOM when closed?

Thanks, Yaniv

vodkabears commented 8 years ago

Use events, use JS initialization or use a single modal and replace the inner content.