"Open the tab defined in the URL" compatibility
- Better compatibility by not using ``` - If page is scrollable, prevent jumping down past the tabs
This commit is contained in:
parent
a1a7a7fd38
commit
45f68cbf39
@ -283,11 +283,9 @@ $(document).ready(function() {
|
||||
|
||||
form.hide().appendTo("body").submit();
|
||||
});
|
||||
|
||||
// Open the tab defined in the URL
|
||||
$('a[href="'+ window.location.hash +'"]').tab('show');
|
||||
window.scrollTo(0);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Open the tab defined in the URL
|
||||
const anchor = window.location.hash;
|
||||
$(`a[href="${anchor}"]`).tab('show');
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user