Link to Tab from different page on exported site

Hello,

I have created tabs that I would like to link to from a different page. I have added the following script and tried different versions of the link and still cannot get it to work. What I am missing? The site was transferred to Wordpress and the js and css files were copied over as well. Please help.

http://sidmedia.org/portfolio/tv-series/?tab=tab-2

<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>

Hi @KMN, In these situations, a good first place to check what might be the issue, is to look to see what javascript errors if any exist on the page, when you click the link. Go to your published page on the server hosting your WP site, and if you are using chrome, then right click and inspect element on your page. Then click on the Console tab and see if there are any messages, errors etc. I have never seen this particular issue before, and to be honest, I am not even sure if it is possible to use this code in the Wordpress site.

But, if you clear any errors first, then you will be a big step forward, to understanding what is not working. If there is some other unrelated script, which has an error on the page, it will halt the script execution of every other script on the page.

I hope this helps, Maybe some WP gurus out there, can assist on this one :slight_smile: Cheers, Dave

Thanks @cyberdave I will do what you suggest. Thanks for your assistance.