Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1219552
    clearspark
    Participant

    Hi there,
    I’ve added tabs to a visual composer page and when a user clicks on each tab, the page automatically scrolls down to the bottom of the page.

    Also when you try to scroll up using the page scroll bar, the behaviour is very jumpy.

    I’ve tried inserting the java snippets outlined in this solution here (https://community.theme.co/forums/topic/page-scrolls-up-and-down-when-clicking-on-tab-nav-items-and-accordian-items/), but the problem persists.

    You can view the issue on this page here: http://www.certipages.com/labelrydev/faq/

    Thankyou.

    #1219599
    Thai
    Moderator

    Hi There,

    Please add the following code under Customizer > Custom > Global Javascript:

    jQuery(function($) {
    	$('.vc_tta-tabs-list li>a').off('click touchend touchstart');
    });

    Hope it helps πŸ™‚

    #1219642
    clearspark
    Participant

    Hi, thanks for the quick response. Just added the code, but no change to the behaviour.

    Andy.

    #1219645
    Thai
    Moderator

    Hi There,

    In this case, 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 login to your site
    – WordPress Admin username / Password

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

    Thanks.

    #1219650
    clearspark
    Participant
    This reply has been marked as private.
    #1219717
    Rupok
    Member

    Hi there,

    Let’s try this JS :

    jQuery(document).ready(function($) {
       $('.vc_tta-tab a').click(function(e) {
          $('html, body').stop();
       });
    });

    Let us know if that works for you.

    #1219838
    clearspark
    Participant

    Unfortunately no change. You can see for yourself at the test URL: http://www.certipages.com/labelrydev/faq/

    Any other methods?

    #1220269
    Lely
    Moderator

    Hi There,

    I have updated the code to this:

    jQuery( function($) {
    
    $('.vc_tta-tab a').on('click', function( e ){
    
    setTimeout( function() { 
    $('html, body').stop().stop();
    console.log('scrolling stopped');
    }, 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');
    });
    
    });

    The issue is now fixed. See this:http://screencast-o-matic.com/watch/cD6Fekjg6r

    Cheers!

    #1222025
    clearspark
    Participant

    Perfect, thankyou.

    #1222134
    Paul R
    Moderator

    You’re welcome! πŸ™‚

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