• Resolved josh4762

    (@josh4762)


    Hello, I am using Tabs and Tabs Pro. I have several tabs set up but would like to create a link within the content of one tab that links to another tab.

    For example, I have an ‘About Us’ tab and within the content, I would like some anchor text to link to the ‘Contact’ Tab.

    I have tried using the same link as the Tab itself (eg. #tabs_desc_2087_4), but that doesn’t seem to work.

    Any assistance would be greatly appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 1.install Insert Script In Headers And Footers plugin.
    2.you can find it in settings>Insert Script In Headers And Footers and paste the following script in “Scripts in Footer” textarea.

    <script type=”text/javascript”>
    jQuery(function () {
    jQuery(‘.tabcall’).on(‘click’, function(event) {
    event.preventDefault();
    var tabid = jQuery(this).attr(‘tab-id’);
    jQuery(‘[data-toggle=”tab”][href=”#’ +tabid + ‘”]’).trigger(‘click’);
    })
    });
    </script>

    3.now copy and paste following code in tab description

    <a tab-id="tabs_desc_2087_2" class="tabcall" data-toggle="tab">link</a>

    you have to just change the tabs_desc_2087_2 last digit of id according to your tabs sequence eg. tabs_desc_2087_3 and run the It..
    test it and please let me know.

    Thakns.

    Thread Starter josh4762

    (@josh4762)

    You are a legend! Thank you very much!

    • This reply was modified 5 years, 1 month ago by josh4762.

    hi @josh4762 ,

    glad that your issue as been resolved..please rate our plugin.

    Thanks

    Hello,

    I would like to achieve exactly this. Unfortunately I cannot get this working. I tried several script plugins with negative result. Is there anything else that needs modifying apart from tabs_desc_xxxx-x? Any help would be appreciated as I really like the plugin!

    Note: When I check the code online the following part identifies as error [href=”#’ +tabid + ‘”]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to link to specific tab?’ is closed to new replies.