Saltar navegación

[Resuelto] Toolset view ajax results scroll on top

This support ticket is created hace 2 años. 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: Asia/Hong_Kong (GMT+08:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por garenM hace 2 años.

Asistido por: Luo Yang.

Autor
Mensajes
#2611443

Hey ,

I have this view results here enlace oculto and I need to scroll on top when someone navigate to the second page. Now when I click 2, I land in the same place, meaning bottom of the project list. Instead, can we take the user up the project list again?

#2611487

Hello,

There isn't such kind of built-in feature, it needs custom codes, for example, you can edit your post view, in section "Search and Pagination"-> "JS editor", add below custom JS codes:

jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
	/**
	* data.view_unique_id (string) The View unique ID hash
	* data.effect (string) The View AJAX pagination effect
	* data.speed (integer) The View AJAX pagination speed in miliseconds
	* data.layout (object) The jQuery object for the View layout wrapper
	*/
  	jQuery(window).scrollTop( 100 );
});

It will be triggered after Views AJAX pagination completed.

More helps:
enlace oculto

#2611571

My issue is resolved now. Thank you!