Work on homepage more

This commit is contained in:
Matthew Holt 2023-11-08 17:40:38 -07:00 committed by Francis Lavoie
parent 94930e119c
commit e25c900669
No known key found for this signature in database
GPG key ID: C5204D4F28147FC8
6 changed files with 365 additions and 90 deletions

View file

@ -20,5 +20,14 @@ const resp = fetch("/resources/testimonials.json").then(async resp => {
}
$(`.testimonial-col:nth-child(${i%3 + 1})`).append(tpl);
}
on('mouseover', '.rollover', e => {
const target = e.target.closest('.rollover') || e.target;
$$(`.${target.dataset.rollover}`).forEach(elem => elem.classList.add('show'));
});
on('mouseout', '.rollover', e => {
const target = e.target.closest('.rollover') || e.target;
$$(`.${target.dataset.rollover}`).forEach(elem => elem.classList.remove('show'));
});
});
});