Work on homepage more

This commit is contained in:
Matthew Holt 2023-11-08 17:40:38 -07:00 committed by Francis Lavoie
parent 3080b07b44
commit 870345f5b9
No known key found for this signature in database
GPG key ID: 0F66EE1687682239
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'));
});
});
});