Skip to content

Instantly share code, notes, and snippets.

@vejnoe
Last active October 30, 2020 08:23
Show Gist options
  • Save vejnoe/b6d7928a4d5f1b26fa318101d22f8b81 to your computer and use it in GitHub Desktop.
Save vejnoe/b6d7928a4d5f1b26fa318101d22f8b81 to your computer and use it in GitHub Desktop.
Acticating the Tab with the same name as the #hash from the URL - Webflow
<script>
var Webflow = Webflow || [];
Webflow.push(function () {
// Getting the #hash from the URL
var url = window.location.hash;
// Removing the # symbel
var tab = url.substr(1);
// Acticating the tab with the same name as the #hash from the URL
$('.w-tab-menu > a[data-w-tab="' + tab + '"]').click();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment