Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- // Javascript to enable link to tab
- var url = document.location.toString();
- if (url.match('#')) {
- $('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show');
- }
- // Change hash for page-reload
- $('.nav-tabs a').on('shown.bs.tab', function (e) {
- window.location.hash = e.target.hash;
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement