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: Fulton Garrick - Contact
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
avivtech
(Aviv Shwartz)
February 25, 2020, 8:17am
4
Does this helps? Answers all your questions?
GiovannaVP
(Giovanna Vieira)
December 12, 2022, 8:40pm
5
Hi, thank you for the very detailed video explanation. Unfortunately I can’t figure out what I am doing wrong… Could you help me out with it?
Here is the read only link: Webflow - Aliru
In the home page there is a section highlighting some case studies, and each card of that section should open the correct tab link in the “Referenzen” page.
This is what I have in the cards: /referenzen/?tab=Baeder#Referenzen
Now, I can’t get the correct tab to open in this page:
I also added the custom code from your Youtube video on all pages from the project settings. Please let me know if you see what I am doing wrong
mww
(Milan )
December 14, 2022, 4:07am
6
Hi @GiovannaVP ,
Try changing the URLs to lowercase for each of your links on the homepage.
Example: /referenzen/?tab=baeder#Referenzen
This should hopefully fix the problem!