-
-
Save debiprasad/e35e72b72171d78ef021 to your computer and use it in GitHub Desktop.
Opens a tab other than the active tab, when the page loads using the hash in the URL. Useful, if using Bootstrap tabs.
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
if (location.hash) { | |
var hashId = location.hash; | |
if ($('a[href="' + hashId + '"]').length > 0) { | |
$('a[href="' + hashId + '"]').click(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment