Skip to content

Commit

Permalink
Wait for bootstrap to be loaded for anchor hash
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletimmermans authored Aug 10, 2024
1 parent d047673 commit 234209c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/anchor-hash.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
document.addEventListener("DOMContentLoaded", function() {
window.addEventListener("load", function() {
var modal = new bootstrap.Modal(document.getElementById("aboutModal"));
var dropdown = new bootstrap.Dropdown(document.getElementById("dropdownMenu2"));
if (window.location.hash.toLowerCase() === "#about") {
Expand All @@ -8,4 +8,4 @@ document.addEventListener("DOMContentLoaded", function() {
modal.hide();
dropdown.show();
}
});
});

0 comments on commit 234209c

Please sign in to comment.