Using this script in the before heading tag
I am trying to set up this site so that the footer buttons on click move to the tab section and select the corresponding tab/class so the info is shown. Currently i have the buttons setup like this:
/?tab=tab-title-1
/?tab=tab-title-2
.
.
.
and the tabs themselve have the class
tab-title-1 , tab-title-2 etc
Can someone help out?
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(results1.replace(/+/g, " "));
}
});
Here is my site Read-Only:
https://preview.webflow.com/preview/wd-carmanagement-project?utm_medium=preview_link&utm_source=designer&utm_content=wd-carmanagement-project&preview=0b40940e983a91bb6518c70e79f6f117&workflow=preview