Add hash when selecting nav tab
This commit is contained in:
parent
ea2d5af69a
commit
0aa266d093
1 changed files with 8 additions and 1 deletions
|
|
@ -493,9 +493,16 @@ thead th {
|
|||
setTimeout(function() {
|
||||
$('.nav-tabs a[href="' + window.location.hash + '"]').tab('show');
|
||||
}, 1);
|
||||
|
||||
}
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
var target = $(e.target).attr("href") // activated tab
|
||||
console.log(target);
|
||||
var scrollmem = $('html,body').scrollTop();
|
||||
window.location.hash = target;
|
||||
$('html,body').scrollTop(scrollmem);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue