Skip to content

Instantly share code, notes, and snippets.

Created October 30, 2014 07:34
Show Gist options
  • Save anonymous/358532e2107220db16f5 to your computer and use it in GitHub Desktop.
Save anonymous/358532e2107220db16f5 to your computer and use it in GitHub Desktop.
Display the Bootstrap tab when page loads with the hash in the url
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