finished converting service data to JSON

This commit is contained in:
2026-01-11 13:32:02 -05:00
parent 9be65f427c
commit 51e1a994b5
4 changed files with 287 additions and 20 deletions
+8 -4
View File
@@ -14,7 +14,7 @@
<style>
h1 {
margin-bottom: 5rem;
margin-bottom: 6rem;
}
.jx-handle, .jx-arrow {
@@ -243,6 +243,7 @@
window.onload = function () {
// first, insert all reviews into the page
insertReviews(reviewData);
jiggleThreshold = document.getElementById("reviews").offsetHeight + 50;
// set listener to jiggle gallery sliders
window.addEventListener("scroll", jiggleGallerySliders);
// set listener for overriding gallery resize logic
@@ -318,10 +319,13 @@
/** gallery jiggling (indicate to user they can slide images for comparison) */
let jiggled = false;
let jiggleThreshold = document.getElementById("reviews").offsetHeight + 25;
let jiggleThreshold;
async function jiggleGallerySliders() {
// ensure jiggle only triggers once, upon gallery scrolling into view
if (window.scrollY < jiggleThreshold || jiggled) return;
// ensure threshold was initialized + jiggle only once per page load
if (!jiggleThreshold || jiggled) return;
// ensure jiggle only triggers upon gallery scrolling into view
if (window.scrollY < jiggleThreshold) return;
jiggled = true;
// once user scrolls to gallery, move sliders on all images right a bit