-
Notifications
You must be signed in to change notification settings - Fork 486
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
Listening for elements added to DOM #34
Comments
Try $(document).on('inview', '.my_elements', function (){}); |
This works to some degree, but not on elements that are updated asynchronously that appear in view from the start. I have to scroll the element out if view and back again for it to work. It is as if the the initial check to see if an item is in view does not fire when you rebind after the initial load of the Dom. |
If anyone comes upon this old post, then change .on to .livequery for listening on appended items. |
I am doing animation on inview, and it is dynamically added images that float upward. I cannot use inview delegation here on the parent, what happens is the parent attaches all the animations immediately to all children that got appended and animation simply for children does not work in view... The whole idea gets lost. How do I delegate inview event correctly, so that the children inview animate each, not the parent animating all of them simultaneously? |
I'm loading stuff dynamically on a site, and noticed that inview doesn't trigger for stuff that's been added after the bind is initialized. Should I just trigger it again? I imagine there will be double binds then and possibly more strain on the CPU?
The text was updated successfully, but these errors were encountered: