Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1154855
    auldreekie
    Participant

    I’m using tabs on my site. You provided some code to solve the tab scrolling problem on desktop:

    jQuery( function($) {
    
    $(document).on('click', '.x-accordion-toggle, .x-nav-tabs .x-nav-tabs-item a', function( e ){
    $('html, body').stop();
    });
    
    });

    But on mobile the tabs (which appear more like an accordion) scroll, and don’t slide open, so the content of each tab can’t be viewed.

    Can you help?

    #1154956
    Thai
    Moderator

    Hi There,

    Please try with this code instead:

    jQuery(function($) {
    	$('.x-accordion-toggle, .x-nav-tabs .x-nav-tabs-item a').off('click touchend touchstart');
    });

    Hope it helps πŸ™‚

    #1154993
    auldreekie
    Participant
    This reply has been marked as private.
    #1155032
    Thai
    Moderator

    Hi There,

    Please update the previous code a bit:

    jQuery(function($) {
    	$('.x-accordion-toggle, .x-nav-tabs .x-nav-tabs-item a, .vc_tta-tabs-list li a').off('click touchend touchstart');
    });

    Hope it helps πŸ™‚

    #1155066
    auldreekie
    Participant

    Unfortunately this hasn’t helped either…

    clicking the tabs on mobile keeps them closed, and just scrolls down the page a bit, almost to the next tab.

    #1155139
    Thai
    Moderator

    Hi There,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1155151
    auldreekie
    Participant
    This reply has been marked as private.
    #1155377
    Nabeel A
    Moderator

    Hi again,

    Thank you for providing the credentials. Please replace the previous code with this one:

    jQuery( function($) {
    
    $('.vc_tta-tab a').on('click', function( e ){
    
    setTimeout( function() { 
    $('html, body').stop();
    }, 100 );
    
    });
    
    $(document).ready(function() {
        $('.vc_tta.vc_general .vc_tta-panel-title > a, .vc_tta.vc_general .vc_tta-panel-title > a, .vc_tta-tab a').off('click touchstart touchend');
    });
    
    });

    Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

    #1156794
    auldreekie
    Participant

    Desktop – no scrolling and opens fine
    Mobile – opens fine. still scrolls, but I can live with that.

    Thanks for your help!

    #1156827
    Joao
    Moderator

    Hi There,

    Let us know if you need further help,

    Joao

  • <script> jQuery(function($){ $("#no-reply-1154855 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>