100-project-100-days-website/100_projects/95-section-landing-page/main.js
2023-05-27 09:36:13 +03:00
Ask

8 lines
473 B
JavaScript

{62f48fe6d0f330df21f7188559bab2ba10b3ebd3 true 473 main.js 0xc001c4ccb0}

const content = document.querySelector(".content");
const left = document.querySelector(".left");
const right = document.querySelector(".right");
left.addEventListener('mouseenter', () => content.classList.add('hover-left'))
left.addEventListener('mouseleave', () => content.classList.remove('hover-left'))
right.addEventListener('mouseenter', () => content.classList.add('hover-right'))
right.addEventListener('mouseleave', () => content.classList.remove('hover-right'))