Saltar navegación

[Resuelto] Conditional block set to pagination

This support ticket is created hace 3 años, 8 meses. 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)

Etiquetado: 

Este tema contiene 16 respuestas, tiene 3 mensajes.

Última actualización por Pete hace 3 años, 8 meses.

Asistido por: Jamal.

Autor
Mensajes
#2099941

Hello Pete,

What Minesh has said is not false. It is just difficult in this case because all the elements have generic classes(from Kadence, Toolset, and Gutenberg). What I suggested is the most straightforward method, you add a class or an ID to the element that you want to target, and voila!

I inspected the page, as Minesh said, and I was able to come up with the following selector ".inner-column-1 .hide-mob-map"
The code, then, is:

jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
    jQuery('html, body').animate({ scrollTop: (jQuery(".js-wpv-view-layout").offset().top) - 220 }, 'slow');
 
    var x = jQuery(".js-wpv-view-layout").data('pagination');
    var selector = '.inner-column-1 .hide-mob-map';
    if(x.page > 1){
        jQuery( selector ).hide()
     }else{
         jQuery( selector ).show();
     }
});
#2100039

My issue is resolved now. Thank you!