You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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
The text was updated successfully, but these errors were encountered: