Hi there,
Noticed a slight issue with auto scroll and can't work out why.
Code used is:
jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
jQuery('html, body').animate({ scrollTop: (jQuery(".js-wpv-view-layout").offset().top) - 250 }, 'slow');
});
On this page, at the bottom of the grid, pagination when clicked works great:
hidden link
This page, has a slightly different layout yet uses the same View set up:
hidden link
Yet when you click on pagination, the page scrolls to the bottom of the page, then scrolls up.
It's odd why the page pulls down 'before' scrolling up.
Any thoughts on why this may be please?
Thank you.
Hello, the code you mentioned isn't triggered until after the pagination event is complete, which is fired after the page scrolling you have described. It looks like as content is added and removed from the View between pages, the bottom of the page seems to be rising when the page height shrinks temporarily before new content is loaded. I would look for a difference in Views caching settings for these two Views. You can find that in the Pagination and Slider panel of the View editor when you click "Advanced Settings". That's the first thing that comes to mind, as well as differences in animation settings and any other custom code that might be triggered when pagination is initiated (as opposed to completed). Anything in caching or animation that can account for the visual differences here?
Hi there,
They are essentially the same View, one just a clone of the other. The only difference is the one that works, as it should, has 5 Taxonomy filters and the one that isn't right has 4.
The settings you suggested to check are nearly the same also, the only difference is the amount that is displayed.
Everything else will be the same, this because they are the same...just cloned.
My issue is resolved now. Thank you!