Streaming live at 10am (PST)

Linking to a specific tab from a different page

Hi there,

I’m having difficulty in linking to a specific tab from a different page on the site below.

I’m using the following code within the Head

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

The setup, for example, is the bottom CTA Client button: https://www.fultongarrick.com/contact?tab=clients-tab

https://preview.webflow.com/preview/fultongarrick?utm_medium=preview_link&utm_source=dashboard&utm_content=fultongarrick&preview=7630a6eb5e99ff3b82762cef87c6cffd&mode=preview

Not sure where I’ve gone wrong, any advice will be much appreciated.

Thanks!

Thanks Avivtech, much appreciated :wink:

1 Like

Does this helps? Answers all your questions?