Open cssagogo opened 9 years ago
I also have trouble getting the plugin to fire on AJAX-loaded DOM elements.
me three
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.
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