Skip Navigation

[Resolved] Pagination into views output make scroll not working properly

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 7 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#558141

I am trying to:

Make the scroll animation of the Views pagination work properly, when the pagination is inserted into the Views Output, instead of the Views Filter Output.

Link to a page where the issue can be seen:

hidden link

I expected to see:

When I use the lower pagination control (which is the one I want to use), there is a scroll up animation, which is not heading to the top of the section but to the middle, also if you click to the last page (n 13) the page scroll down out of the Views product section, this should scroll up too.

I've already opened a thread with this topic, but it has been closed after few days, for lack of answer... (by another supporter) please can we fix it this time.

#558207

Hi, I recommend adding some JavaScript in your View that will scroll the page up to the top of the results again. Go into your View and underneath the Loop Output editor you will see a JS panel. Toggle it open, then paste the following code into the editor:

jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
    jQuery("html, body").animate({ scrollTop: (jQuery('.js-wpv-filter-form').first().offset().top - 30) }, 1000);
});

Save this code and retest your View. You can tweak the final animation position by increasing or decreasing the number 30 as desired. Please let me know if this does not resolve the issue to your satisfaction.