mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-16 12:51:49 +00:00
21 lines
584 B
JavaScript
21 lines
584 B
JavaScript
document.addEventListener('DOMContentLoaded', async () => {
|
|
const firstHalf = document.querySelector('#firstHalf')
|
|
const secondHalf = document.querySelector('#secondHalf')
|
|
|
|
// Listen to hovers
|
|
firstHalf.addEventListener('mouseover', () => {
|
|
secondHalf.classList.add('darken')
|
|
})
|
|
|
|
firstHalf.addEventListener('mouseout', () => {
|
|
secondHalf.classList.remove('darken')
|
|
})
|
|
|
|
secondHalf.addEventListener('mouseover', () => {
|
|
firstHalf.classList.add('darken')
|
|
})
|
|
|
|
secondHalf.addEventListener('mouseout', () => {
|
|
firstHalf.classList.remove('darken')
|
|
})
|
|
}) |