saribe / eModal

Easy Modal for bootstrap, is a simple way to create modal dialogs using javascript.
http://saribe.github.io/eModal
271 stars 97 forks source link

Modal not showing when page get reloaded using ajax #37

Closed kakalos12 closed 8 years ago

kakalos12 commented 8 years ago

Hi there, I've got a very strange situation with modal, I debugged but couldn't understand the cause of this. I'm using smartadmin to build an admin page. (Demo : http://192.241.236.31/themes/preview/smartadmin/1.8.x/ajax/index.html#ajax/dashboard.html ). In every page when I click the navigation link, the content (id content is reloaded with new content). I setup the emodal js successfully. The first time I access that page, emodal works ok, then I click another nav link then go back to emodal page, the modal only show the overlay. One thing that when I debuged is that $modal's outerHtml changed when i go back to emodal page. The first time modal display & close, the $modal's Html contains divs like modal-content, modal-header ... , , .., At the time I go back to emodal page, the $modal's html has only empty .modal div ( ex : "

kakalos12 commented 8 years ago

Never mind, I just check the script of the template, it remove the modal div.

Thanks, Dong