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

Does not fire for async elements in view #43

Open
cssagogo opened this issue Apr 13, 2015 · 3 comments
Open

Does not fire for async elements in view #43

cssagogo opened this issue Apr 13, 2015 · 3 comments

Comments

@cssagogo
Copy link

I'm working on a dashboard with modules that load when inview. The script works great until I change date ranges and clear out the contents of the modules. When this happens the elements inview on change do not load because they never left the view. They do not fire until I scroll down and back again. So how do I make inview see the items as new elements again?

Here is a bin of the issue I'm having. The items start yellow and then get changed to red. On click of reset the items are changed back to yellow, but because the inview already fired off the items do not respond. Anyway to get inview to behave as if on a fresh page load?

http://jsbin.com/lameya/4/edit

@mhaagens
Copy link

I also have trouble getting the plugin to fire on AJAX-loaded DOM elements.

@peazz
Copy link

peazz commented Nov 16, 2015

me three

@TheCleric
Copy link

I also had this issue, but I discovered it's because of the scroll event. The scroll event fires on page load, but not after ajax events, so if you fire this event manually:

$(window).scroll();

after doing your ajax call and rebind of the event it will catch your new items.

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

4 participants