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

Using remodal with ajax (pjax) #194

Open
ghost opened this issue Nov 12, 2015 · 2 comments
Open

Using remodal with ajax (pjax) #194

ghost opened this issue Nov 12, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 12, 2015

This line says that all content will be executed only once, when the page is loaded.
So $(document).find(..) isn't executed when navigating by ajax (pjax in my case).

My temporary solution is to wrap every non-event function inside of $(document).ready(..) in $(document).on('click', ...), but I think this should be the core.

@goranefbl
Copy link

my fix was to use classes instead of id's for placing ajax fetched content inside divs.

@Tusko
Copy link

Tusko commented Oct 13, 2016

do you load new items with AJAX (pjax)?

My solution is (add code into ajax success):

     $('.grid').append(html).find('[data-remodal-id]').remodal();

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

No branches or pull requests

3 participants