This seemed straightforward enough, but I’m running into trouble. Can anyone lend a hand?
This is the tutorial I followed:
I even created a brand new blank project, then I 1) added the script to the custom code footer area, 2) added the classes to the tabs, then 3) added the special URL to the button and still no dice?
Your code has some errors/omissions. You are calling a function before defining the variable(s) it depends on. Correct code is, sorry for the previous one.
<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>