Streaming live at 10am (PST)

Linking to a specific tab from another page

I am trying to link to specific tabs from my home page. I have 6 tabs on my shopping page, and 6 videos on my home page. I want each video to link to a specific tab.

I pasted this code in the body:

<script>
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(location.search);
    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
  }
});
</script>

And each of the video links to the tab like so: /shopping?tab=shopping-forher

I found this custom code here: Link to Open Tab on Another Page - #11 by Chirantan

But I don’t understand what’s the problem with it, why it doesn’t work. My tabs have custom classes and links should be linking to them? Please help!

Here is my site Read-Only: Webflow - OT:US TO:US

Hi,

Here are somethings I to check,

  1. Make sure your custom class has no gaps and everything is in lowercase.
  2. Check your style code again.

If both doesn’t work then share the preview link with your implementation, I’ll be happy to help. :slight_smile: