Streaming live at 10am (PST)

Access tab item with external link

Hi all, I’m trying to access a specific tab item of my tabs component through click a footer link (for example), and isn’t working. I don’t understand why.

I’m using that code:

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, " "));

Screenshot 2021-10-18 at 17.56.12

Screenshot 2021-10-19 at 09.56.33

Also, I’ve tried to use several Webflow forum answers but is still not working…

Any ideas to figure out this?

Thanks :smiley:

Hi @Anna_Juni, thanks for your post. Since this is using custom code and custom code is not rendered in the designer, could you help to share the the published page link and which link on the page you have this setup?

This will help the community to provide a better answer if they can see the published behavior/error messages etc.

Thanks in advance

Hi Dave, thanks for your answer. The problem is that it hasn’t got any error and the behavior is simple, I’ve linked the footer link to allow it to open the new page “Solutions” with the ?tab=tabName but isn’t doing nothing… I don’t know if the problem is that the Webflow variable always is [ ].

This is the published link in Webflow:

The links are in the footer under the Industries title.

Thank you :smiley: