mirror of
https://github.com/caddyserver/website.git
synced 2025-04-24 22:16:15 -04:00
Syntax highlight on-demand example, fix rollover
This commit is contained in:
parent
7cba863d53
commit
4610d84904
4 changed files with 40 additions and 27 deletions
|
@ -20,14 +20,5 @@ 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'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue