Created
July 10, 2020 03:10
-
-
Save rwaddin/e98aec4d3cf5748b0cc797d2e5a4740b to your computer and use it in GitHub Desktop.
ketika redirect langsung buka tab sesuai url
This file contains hidden or 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
// ref : https://stackoverflow.com/questions/43584707/bootstrap-tab-throws-dataoption-is-not-a-function-error | |
jQuery(document).ready(function($) { | |
// Javascript to enable link to tab | |
var url = document.location.toString(); | |
if (url.match('#')) { | |
var name = url.split('#')[1] | |
$('.nav-tabs a[href="#' + name + '"]').tab('show'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment