Building Community, One Home at a Time

BLOGS AND RESOURCES

`; grid.appendChild(card); }); })();

OUR CLIENTS ARE SAYING

${r.text}

${r.name}

${badge}

`; const dots = dotsEl.querySelectorAll('.atg-dot'); const activeIdx = Math.floor(idx * dotCount / reviews.length); dots.forEach((d, j) => d.classList.toggle('active', j === activeIdx)); } function go(i) { idx = (i + reviews.length) % reviews.length; render(idx); } function start() { timer = setInterval(() => go(idx + 1), 6000); } function stop() { clearInterval(timer); } document.getElementById('atg-prev').addEventListener('click', () => { stop(); go(idx - 1); start(); }); document.getElementById('atg-next').addEventListener('click', () => { stop(); go(idx + 1); start(); }); let touchX = 0; content.addEventListener('touchstart', e => { touchX = e.changedTouches[0].screenX; stop(); }, {passive: true}); content.addEventListener('touchend', e => { const diff = touchX - e.changedTouches[0].screenX; if (Math.abs(diff) > 50) diff > 0 ? go(idx + 1) : go(idx - 1); start(); }, {passive: true}); document.getElementById('atg-reviews').addEventListener('mouseenter', stop); document.getElementById('atg-reviews').addEventListener('mouseleave', start); go(0); start(); })();