Skip Navigation

[Resolved] Auto Scroll Issue

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Pete 2 months ago.

Assigned support staff: Christian Cox.

Author
Posts
#1713833

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.

#1713945

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

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?

#1713955

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.

#1714585

My issue is resolved now. Thank you!