mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-08-14 13:11:48 +08:00
fix darken
This commit is contained in:
parent
8ce75a9f37
commit
aebf621a47
@ -1,21 +1,36 @@
|
|||||||
document.addEventListener('DOMContentLoaded', async () => {
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
const firstPanel = document.querySelector('#firstPanel')
|
const firstPanel = document.querySelector('#firstPanel')
|
||||||
const secondPanel = document.querySelector('#secondPanel')
|
const secondPanel = document.querySelector('#secondPanel')
|
||||||
|
const thirdPanel = document.querySelector('#thirdPanel')
|
||||||
|
|
||||||
// Listen to hovers
|
// Listen to hovers
|
||||||
firstPanel.addEventListener('mouseover', () => {
|
firstPanel.addEventListener('mouseover', () => {
|
||||||
secondPanel.classList.add('darken')
|
secondPanel.classList.add('darken')
|
||||||
|
thirdPanel.classList.add('darken')
|
||||||
})
|
})
|
||||||
|
|
||||||
firstPanel.addEventListener('mouseout', () => {
|
firstPanel.addEventListener('mouseout', () => {
|
||||||
secondPanel.classList.remove('darken')
|
secondPanel.classList.remove('darken')
|
||||||
|
thirdPanel.classList.remove('darken')
|
||||||
})
|
})
|
||||||
|
|
||||||
secondPanel.addEventListener('mouseover', () => {
|
secondPanel.addEventListener('mouseover', () => {
|
||||||
firstPanel.classList.add('darken')
|
firstPanel.classList.add('darken')
|
||||||
|
thirdPanel.classList.add('darken')
|
||||||
})
|
})
|
||||||
|
|
||||||
secondPanel.addEventListener('mouseout', () => {
|
secondPanel.addEventListener('mouseout', () => {
|
||||||
firstPanel.classList.remove('darken')
|
firstPanel.classList.remove('darken')
|
||||||
|
thirdPanel.classList.remove('darken')
|
||||||
|
})
|
||||||
|
|
||||||
|
thirdPanel.addEventListener('mouseover', () => {
|
||||||
|
firstPanel.classList.add('darken')
|
||||||
|
secondPanel.classList.add('darken')
|
||||||
|
})
|
||||||
|
|
||||||
|
thirdPanel.addEventListener('mouseout', () => {
|
||||||
|
firstPanel.classList.remove('darken')
|
||||||
|
secondPanel.classList.remove('darken')
|
||||||
})
|
})
|
||||||
})
|
})
|
Loading…
x
Reference in New Issue
Block a user