Source: dist/css/acc_boot.css, line 17425
4.1.2 JavaScript: Snippet to Show on Hover
Description:
This is currently being depreciated. Please visited the new location for the styleguide at https://assets.acc.org/Arches/Latest/docs/
Source: dist/css/acc_boot.css, line 17425
Description:
<script>
document.addEventListener("DOMContentLoaded", function(){
// make it as accordion for smaller screens
if (window.innerWidth > 992) {
document.querySelectorAll('.navbar .nav-item').forEach(function(everyitem){
everyitem.addEventListener('mouseover', function(e){
let el_link = this.querySelector('a[data-bs-toggle]');
if(el_link != null){
let nextEl = this.querySelector('.dropdown-menu');
el_link.classList.add('show');
nextEl.classList.add('show');
nextEl.setAttribute("data-bs-popper", "none")
}
});
everyitem.addEventListener('mouseleave', function(e){
let el_link = this.querySelector('a[data-bs-toggle]');
if(el_link != null){
let nextEl = this.querySelector('.dropdown-menu');
el_link.classList.remove('show');
nextEl.classList.remove('show');
nextEl.removeAttribute('data-bs-popper');
}
})
});
}
// end if innerWidth
});
</script>