Perspectives

Proprietary data, expert analysis and bold thinking for leaders who want to achieve the extraordinary.

Home / Perspectives

Lost password

Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.

document.addEventListener("DOMContentLoaded", function () { const section = document.querySelector(".cp-authority-strip"); const counters = document.querySelectorAll(".cp-counter"); if (!section || !counters.length) return; let started = false; function animateCounter(counter) { const target = parseInt( counter.getAttribute("data-target"), 10 ); let current = 0; const increment = target / 120; function updateCounter() { current += increment; if (current < target) { counter.innerText = Math.floor(current).toLocaleString(); requestAnimationFrame(updateCounter); } else { counter.innerText = target.toLocaleString(); } } updateCounter(); } function checkScroll() { if (started) return; const sectionTop = section.getBoundingClientRect().top; const triggerPoint = window.innerHeight * 0.78; if (sectionTop < triggerPoint) { started = true; counters.forEach((counter, index) => { setTimeout(() => { animateCounter(counter); }, index * 220); }); window.removeEventListener( "scroll", checkScroll ); } } window.addEventListener( "scroll", checkScroll ); checkScroll(); });