[c] debug change to red on hover and not always
This commit is contained in:
parent
77ff08f737
commit
77d866f3c9
1 changed files with 8 additions and 4 deletions
|
@ -17,11 +17,15 @@
|
|||
function checkOverflow() {
|
||||
const modCards = document.querySelectorAll('.mod-card');
|
||||
modCards.forEach((modCard) => {
|
||||
if (modCard.scrollHeight > modCard.offsetHeight) {
|
||||
modCard.style.backgroundColor = 'red';
|
||||
} else {
|
||||
modCard.addEventListener('mouseover', () => {
|
||||
if (modCard.scrollHeight > modCard.offsetHeight) {
|
||||
modCard.style.backgroundColor = 'red';
|
||||
}
|
||||
});
|
||||
|
||||
modCard.addEventListener('mouseout', () => {
|
||||
modCard.style.backgroundColor = '';
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue