Skip Navigation

[Resolved] Pagination enabled with manual transition and AJAX

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user would like a paginated view to scroll up automatically after loading a page with AJAX

Solution:
This feature is not available. Toolset can execute a Javascript function after AJAX pagination loading.
Depending on your use case you may need to create a different function. Check a simple case here https://toolset.com/forums/topic/pagination-enabled-with-manual-transition-and-ajax/#post-1587297

This support ticket is created 4 years, 8 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by Pete 4 years, 8 months ago.

Assisted by: Jamal.

Author
Posts
#1586527

Hi there,

On this and many pages we have added pagination enabled with manual transition and AJAX:
hidden link

All works I guess however when you click to pagination button for the next page, why on earth does it not load the page to the top of the page and grid?

It does this manual transition and page load, AJAX make it smoother yet does not reload to top of grid.

Is this right?

Thank you.

#1587297

Hello and thank you for contacting the Toolset support.

If you believe this feature should be supported by Toolset views, please suggest it here https://toolset.com/contact-us/suggest-a-new-feature-for-toolset/

To implement it, create a custom Javascript function inside your view code that will scroll up to the top of the view. I tested with the following example:

function scrollToTop() { 
    window.scrollTo(0, 0); 
}

Then add the function the the advanced settings for pagination to be executed after each pagination. Check my screenshot hidden link

I hope this helps. Let me know if you still need assistance.

#1587355

My issue is resolved now. Thank you!