1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00

Add hash when selecting nav tab

This commit is contained in:
Hillel Coren 2016-09-05 21:51:00 +03:00
parent ea2d5af69a
commit 0aa266d093

View File

@ -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>