Skip to content

Instantly share code, notes, and snippets.

View henriquetroiano's full-sized avatar

Henrique Troiano henriquetroiano

View GitHub Profile
const menu__sel = document.querySelectorAll('.menu_content li'); // select all items from menu
menu__sel.forEach((thisLi) => {
thisLi.addEventListener('mouseover', function() {
thisLi.classList.add('active')
})
thisLi.addEventListener('mouseout', function() {
thisLi.classList.remove('active')