Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #49445

    Rad
    Moderator

    Hi Global,

    The code works fine and tested before it is posted and it was given to different threads with same issues like yours, but it was revised to work on your setup.

    The code have two purpose,

    1. It will link/scroll you to the tab of same page, thus adding “link_to_tab” to a button’s class is a requirement.

    2. It will link/scroll to the tab of another page, thus “link_to_tab” should not be added.

    It means, “link_to_tab” is only required on same page scrolling.

    Could you try this one, a revision to send target object separately.

    jQuery(function($){
      
      $(document).ready(function() {
         x_scroll_to_tab($, $('.x-nav-tabs .x-nav-tabs-item a[href="#' + location.href.split("#").slice(-1)[0] + '"]') );
      });
    
      $('.link_to_tab').click(function(e){
        e.preventDefault();
        x_scroll_to_tab($, $('.x-nav-tabs .x-nav-tabs-item a[href="#' + $(this).attr('href').split("#").slice(-1)[0] + '"]'));
      });
    
    });
    
    function x_scroll_to_tab($, tab_nav) {
                $(tab_nav).click();
                $('html,body').animate({scrollTop: jQuery(tab_nav).offset().top - jQuery('header.masthead').height() },700 ,'swing');
    }

    Let us know.

    #52059

    Global B
    Participant

    Sorry, but it still does not work. If I click the button, the right link appears in my brwoser, but nothing happens. When I activate the link that appears in my browser by reloading the page, it does work…

    #52378

    Alexander
    Keymaster

    Hi there,

    I’m not sure why it wouldn’t be working on your site. 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
    – FTP credentials

    Don’t forget to select Set as private reply to ensure that your data remains hidden

    #52744

    Global B
    Participant
    This reply has been marked as private.
    #52983

    Rad
    Moderator

    Hi there,

    You must not add element attribute with quotes or html elements.

    Examples, these are wrong :

    <hr class="\&quot;x-gap\&quot;" style="\&quot;margin:" 10%="" 0="" 0;\"="">

    <a class="x-btn <span x-btn-real x-btn-rounded x-btn-small" href="#tab-4" data-options="thumbnail: ''">Prijzen</a>

    And buttons does not have link_to_tab which should have, except if it’s linking to another page’s tab.

    Yours is :
    <a class="x-btn <span x-btn-real x-btn-rounded x-btn-small" href="#tab-5" data-options="thumbnail: ''">Beschikbaarheid</a>

    And should be :

    <a class="x-btn x-btn-real x-btn-rounded x-btn-small link_to_tab" href="#tab-5" data-options="thumbnail: ''">Beschikbaarheid</a>

    And upon checking, you are using wrong shortcode format :

    [button class=<span style="color: #444444;">"link_to_tab"</span> type="real" shape="rounded" size="small" href="#tab-5"]Beschikbaarheid[/button]

    I corrected the 3rd button for test. Should be

    [button class="link_to_tab" type="real" shape="rounded" size="small" href="#tab-5"]Beschikbaarheid[/button]

    And it works.

    Paste your shortcode in Text Mode, so you will find if there is any hidden unwanted html markup.

    Let us know.

    #54466

    Global B
    Participant

    THANKS a lot!!! It whas a hard one, but it feels great to make it finally work!

    Have a nice day!

    #54736

    Rubin
    Keymaster

    You’re welcome!

    #910411

    Global B
    Participant

    Hi there, after updating the theme I have got the same problems as described above…

    Could you please help me out?

    Same website by the way… Tnx a lot!

    #911068

    Christian
    Moderator

    Please give us access to your WordPress admin so we could check. Tried the previous credentials but couldn’t login.

    Thanks.

    #912057

    Global B
    Participant
    This reply has been marked as private.
    #912338

    Christian
    Moderator

    Hey there,

    Would you mind disabling all third party plugins while we investigate?

    Thanks.

    #978312

    Global B
    Participant

    No problem, but do it when you investigate. This website is used everyday, and I can not disable them for a long time, not knowing when you are investigating…

    #978771

    Darshana
    Moderator

    Hi there,

    In that case, will you be able to setup a staging environment with the same copy of your live site? so that we investigate your issue. As we provide an additional development license, you can do this by creating a sub-domain in your server. You can refer to our guide for more information (https://community.theme.co/kb/cornerstone-migration/).

    Let us know.
    Thanks!