Problem:
When I paginate a View, the View will not scroll automatically to its first results in the List (top) but stay where I was previously in the List.
How can I make Views scroll always to the Top after pagination?
Solution:
1. Head to the View in question
2. Find the Parametric Filter Editor and open the JS Tab
3. Click on the Button "Frontend events"
4. Find the hook you need (in your case, Pagination > The AJAX pagination has been completed)
5. Insert the hook and populate it with Custom Code to scroll to the top.
An example of such Custom Code can be found here:
jQuery('html, body').animate({ scrollTop: 0 }, 'fast');
==> Do use jQuery instead of $
WordPress requires you to use standard namespace instead of $
https://toolset.com/documentation/user-guides/adding-custom-javascript-views/
Relevant Documentation:
https://toolset.com/documentation/user-guides/adding-custom-javascript-views/
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 2 replies, has 2 voices.
Last updated by renanC-2 7 years, 10 months ago.
Assisted by: Beda.