Renamed js file and added tooltips support
This commit is contained in:
parent
0c36ecccfa
commit
49461e73e4
1 changed files with 8 additions and 0 deletions
|
|
@ -1,3 +1,10 @@
|
|||
/* tooltips */
|
||||
function initTooltips(section) {
|
||||
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
|
||||
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const offmenu = document.getElementById("offSideMenu");
|
||||
const sidemenu = document.getElementById("secondary-nav");
|
||||
|
|
@ -15,4 +22,5 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||
const mediaQuery = window.matchMedia("(max-width: 992px)");
|
||||
toggleMenus(mediaQuery); // Initial check
|
||||
mediaQuery.addEventListener('change', (e) => toggleMenus(e));
|
||||
initTooltips(document);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue