Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author cubecolour

    (@numeeja)

    This wasn’t part of the scope when the plugin was built, but I guess a way to achieve this might be to link to an element such as an empty div with a specific id immediately before the tabgroup. Then to get the desired tab to show, you might be able to add a few lines of jQuery to add the .responsive-tabs__heading–active class to the specific tab you need the link to be pointing at.

    I’ve not tested this so I don’t know for sure whether it would work but if so, the plugin code could probably be tweaked to help it to be set up, however as this is outside the scope of the plugin it is not something I am able to spend time on investigating or supporting unless I had a specific requirement for this for one of my own projects or if someone commissioned the work.

    Try to make an anchor to a tab like this.
    <a href='#' id='go_to_tab_nr_2'>Go to tab Nr. 2</a>

    And with this little jQuery it will work:

    $('#go_to_tab_nr_2').click(function(){
     $( "li.responsive-tabs__list__item:nth-child(2)" ).trigger( "click" );
    });

    The trick ist to simulate a click on the real trigger.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Anchor to a tab’ is closed to new replies.