Streaming live at 10am (PST)

Linking a button to a specific tab in a tabs menu


I’m currently working on basically a one-page site. Here is the preview link:

I have 4 buttons on the site (default blue color) and I’m trying to assign or link each button to a different tab in the tabs menu (our partner’s section) below. I’ve attempted to use this example in the forums: Linking to Specific Tab from another Link or Button but it seems that this example works with linking a different tab in another page. My Achilles heel is JQuery and I’m having a difficult time trying to solve this. I really would appreciate it if someone could please help me figure this out…Thank you


So… where do you want the buttons to link to? Where are the tabs located? Where have you placed the custom code?


Thank you samliew for the quick reply! There are four buttons, one in each section: kitchen, bath, lifestyle, and outdoor. Each button will need to link to the tabs in the tabs menu below (partner’s section) the four tabs are marked: kitchen, bath, lifestyle and outdoor.
The custom code that I’ve found is:

var Webflow = Webflow || [];
Webflow.push(function () {
  var tabName = getParam('tab');
  if (!tabName) return;

  $('.' + tabName).triggerHandler('click');

  function getParam(name) {
    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
      results = regex.exec(;
    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));

and I placed the custom code within the tag.

I certanly appreciate your assitance on this, I’m a little lost when it comes to JQuery.


I didn’t find the custom code you posted, on your site. Anyway this would be incorrect, as that is for linking to tabs in another page.

I saw this on your published site though (do note that custom code only works on published sites):

  $('.custom-button').on('click', function (evt) {

This is almost correct, however your classes custom-button and target-tab-link are not unique.

You need custom-button-1, custom-button-2, custom-button-3, custom-button-4 buttons,

then target-tab-link-1, target-tab-link-2, target-tab-link-3, target-tab-link-4,

then copy that custom code 4 times like this for each button/tab link pair:

  $('.custom-button-1').on('click', function (evt) {
  $('.custom-button-2').on('click', function (evt) {
  $('.custom-button-3').on('click', function (evt) {
  $('.custom-button-4').on('click', function (evt) {

Button Link to tab on same page

It worked! Thank you so much SamLiew, really appreciate your help!!! You’re Awesome!!!


You’re awesome too! Have a nice day!


Thank you for this @samliew. There’s just one thing I’m wondering - and that’s how I’d make it appear that my custom tab links are “active”?


Any one know any way to make custom tab appear ‘active’?