Link to next tab from inside of the current

Hello!

I’m trying to insert link to next tab from inside of the current one as described here: Linking to Specific Tab from another Link or Button. This is custom code I’m using:

<script>
  $('.custom-button').on('click', function (evt) {
    $('.target-tab-link').triggerHandler('click');
    evt.preventDefault();
  });
</script>

I use exact same class names for link and for target tab (custom-button and target-tab-link). I want it to behave like this:

Link clicked → Tab switched without reloading page or scrolling

but it doesn’t. What am I doing wrong?

My published page: LINK
Site Read-Only: LINK

Hey @pjs

Have you tired moving the code to the “Before ” in Webflow? I am wondering if it’s not working due to you having your script running before the jQuery script.

Oh, wow, it did work! Thank you :slight_smile:

1 Like

You’re welcome. Glad it worked!