Button inside a tab Link to the next tab

Add live url (& Read only link)

Base on this example
https://discourse.webflow.com/t/linking-to-specific-tab-from-another-link-or-button/3665/2

Step1:
Put button inside tab-1 and add some class:
image

Step2
Also add class for the target tab
image

Step3
Add custom code (Before body = after jquery loaded)

Thats it. If something goes wrong i Guessing your selectors are wrong.

Not working - 1 - button issue?

Check if click event working (console.log())
image

<script>
  $('.button-link-to-specific-tab').on('click', function (evt) {
     console.log("Button Test");
    $('.target-tab-link').triggerHandler('click');
    evt.preventDefault();
  });
</script>

Not working - 2 - tab issue?

Check if you select the target tab. Again inspect the live url site - go to console and copy-paste this line of code (Type under the console)
$('.target-tab-link').css("background-color", "red");


Click enter (If the tab is red your selector works fine - Not red - check again names and so on)

2 Likes