Streaming live at 10am (PST)

Button inside a tab Link to the next tab


#1

Hi,

I’m trying to test the following script for a form/survey
but i can’t get it working properly

I followed this topic, but can’t get it working :


thanks for your help
david


#2

Add live url (& Read only link)

Base on this example
https://forum.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.
https://www.w3schools.com/jquery/jquery_ref_selectors.asp

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)


#3

Many thanks for your help Siton

My mistake when i placed tab name on contener and not tab
not works

thanks
david