Streaming live at 10am (PST)

Link to Open Tab on Another Page


#1

Hey hey!

Today’s “What in Webflow” shows how to open a tab using a link:

You can learn more by viewing the read-only link which shows exactly the layout/setup of the website: https://preview.webflow.com/preview/link-to-open-tab?preview=f7e694ae02240d0348d03262663b3d27

Also, the live site can be viewed at http://link-to-open-tab.webflow.io/, and you can clone the site at https://webflow.com/website/Open-Tab-with-a-Link

Don’t forget to add this custom code to your site:

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, " "));
}
});

Feel free to reach out with any questions. I’d be happy to help!

Also, I would love to know what you would like to see presented. I’m not the sharpest crayon in the coloring box, but I love to learn :nerd_face:


Linking a button to a tab
#2

:+1: Great trick @mistercreate! This is definitely something I see in help requests often.