Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal not showing when page get reloaded using ajax #37

Closed
kakalos12 opened this issue Feb 21, 2016 · 1 comment
Closed

Modal not showing when page get reloaded using ajax #37

kakalos12 opened this issue Feb 21, 2016 · 1 comment

Comments

@kakalos12
Copy link

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 : "

<style>.modal-xl{width:96%;}</style>[No other content here]</div")

I can't see any code that remove the modal-content, modal-header div from $modal variable. So that's really strange to me.
Please help me with this situation.

Thanks,
Dong

@kakalos12
Copy link
Author

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

Thanks,
Dong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant