fix(docs): make bullet throb repeat on every scroll into view

Remove unobserve so bullets reset when scrolled out and throb again
on re-entry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-09 23:05:22 -05:00
parent 040f0335c1
commit 7126621e83

View File

@@ -236,15 +236,17 @@
var observer = new IntersectionObserver(
function (entries) {
entries.forEach(function (entry) {
var li = entry.target;
if (entry.isIntersecting) {
/* stagger each bullet by its index within the list */
var li = entry.target;
var siblings = Array.from(li.parentElement.children);
var idx = siblings.indexOf(li);
setTimeout(function () {
li.classList.add('in-view');
}, idx * 120);
observer.unobserve(li);
} else {
/* reset when scrolled out so it throbs again on re-entry */
li.classList.remove('in-view');
}
});
},