Last active
October 30, 2020 08:23
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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