Streaming live at 10am (PST)

Selecting a tab from another page

Hello danro. I got this solution a while ago, and it did work when I implemented it then, but its not working anymore. I’ve done all I can to make it work, but it’s just not working. Please help.

Can you share the url of the site that’s not working?

Here’s the public link to the site.
https://webflow.com/design/in2print?preview=74c543b56e1713537ddfd8a7c90e377b

I am trying to link the footer privacy policy link to the appropriate tab on the policies page.

@Busayo_Kupoluyi I think I found the issue with your custom code.

Since you are wrapping everything in the $(document).ready function, you no longer need to use the Webflow.push wrapper.

Here is an updated snippet for you to use in place of the old one:

//Linking to tab on another page
(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, " "));
  }
}());

Thanks @danro.
Implemented the update and it works now!

I´m having some problems with the link, sorry, my javascript skills are 2%

The page i want to link is /we-offer and here is the print of the structure.

This is the link i´m using and it´s not working
/we-offer?tab=weoffertabscontainer-tabs-link.banks

Can anyone give me some help of what i´m doing wrong?

This trick uses CSS class names to select the tab, so you would need to give your “banks” tab a special class in order to select it. If you apply a new class “banks” to your tab link, the url would look like this:

/we-offer?tab=weoffertabslinks.banks

already did this but it not work :frowning:

Do i have to change anything on the body code ?

Does your tab link look like this in the deisgner?

|240xauto

Please share a public link if this is still an issue, and I’ll take a look!

This topic is now invisible. It will no longer be displayed in any topic lists. The only way to access this topic is via direct link.