Hi there,
We're just setting up some archive pages, never used them much in the past.
Can I ask, how to we achieve scroll to top when pagination is clicked?
We'd prefer not to have a full page reload and use the Ajax function on all our Views.
All our Views have a scroll to top action however anything I try wont work.
And I presume any code go's in the Callback Function, this under Spinners in the sidebar panel?
Better still...is there an infinite scroll option?
This a sample page we're working on:
lien caché
Many thanks in advance.
Nigel
Supporter
Les langues:
Anglais (English )
Espagnol (Español )
Fuseau horaire:
Europe/London (GMT+01:00)
> Better still...is there an infinite scroll option?
Yep. See the pagination settings in the sidebar. When you choose manual ajax updates for pagination, you have infinite scroll as an option.
Hi Nigel,
Thank you for that.
Ok Infinite scrolling when we may have so many posts may not be right for us.
I'm aware of scroll to top codes, as mentioned we already use this for other Views.
Is there one for this?
lien caché
Really like the slide horizontally effect, it just needs to scroll to top, which is really odd this isn't part of the basic function.
Thank you.
Nigel
Supporter
Les langues:
Anglais (English )
Espagnol (Español )
Fuseau horaire:
Europe/London (GMT+01:00)
Try adding the following to the custom JS section of the archive block settings:
jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
jQuery("html, body").animate( {scrollTop: 0}, "fast");
});
Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Could you please try to follow the solution shared by Nigel and check if that help you to resolve your issue.
My issue is resolved now. Thank you!