Problem:
How to scroll back to the top of the page after paginating a View?
Solution:
Add the following code which makes use of the custom JS events provided by Views which can be inserted using the Front-end events button on the custom JS editor of the Search and Pagination section of a View:
jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) { jQuery("html, body").animate( {scrollTop: 0}, "fast"); });
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 |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Ce sujet contient 2 réponses, a 2 voix.
Dernière mise à jour par Il y a 5 années et 11 mois.
Assisté par: Nigel.