Instructions
Quick Start Guide: Get started editing your website with this easy-to-follow guide.
Support: Explore Webflow University's library for comprehensive video lessons on getting started.
- Getting Started with Webflow
- Lesson library
Useful links from Webflow University:
- Style manager
- Using Interactions
Before Publishing: Delete unused sections/pages, clean up CSS classes, clean up unused interactions and delete unused components.-
Breakpoints: Check how your changes behave on different devices by clicking on the top bar of the viewport.
Backups: Restore previous versions from the Backups section in the left sidebar and clicking Settings in case of accidental deletions.
Editing Images and Text: Edit text by double-clicking on static content or use the CMS section for dynamic text. Replace images easily by clicking on them and choosing "Replace Image."
Dynamic Content (CMS): Learn how to manage and update dynamic content using the CMS, which instantly updates referenced content across pages.
Components: Utilize reusable components for efficient editing and consistency across layouts.
Breakpoints: Check how your changes behave on different devices by clicking on the top bar of the viewport.
GSAP custom code
Radolf combines native Webflow GSAP interactions with custom footer scripts for marquees and number counters. Edit the custom scripts in Site Settings → Custom Code → Footer code (Before </body>). The code blocks below are reference documentation; changing a code block on this page does not change the running animation. Back up the footer code before editing. Native heading and section animations are edited separately in Designer → Interactions.
Marquees & Counters
How the counter animation works
The footer script waits for the window load event, registers ScrollTrigger, and finds elements with cc-integer or cc-coma. GSAP animates their textContent from 0 to the number already entered in Designer. duration: 3 runs the count for three seconds; snap: { textContent: 1 } keeps whole-number steps. ScrollTrigger starts when the top of the number reaches 90% of the viewport height. once: true runs it once per page load.
To change the final value: select the number text in Designer and enter a plain integer such as 120. Keep a suffix such as +, %, or “projects” in a separate text element. Keep the existing class: cc-integer displays whole numbers without grouping, while cc-coma is the exact class spelling used by the script for localized grouping. Do not rename it to cc-comma unless you also update the selector in the footer.
To change the speed: find the COUNTERS section in the footer code and change duration: 3 to duration: 2 for a faster count or duration: 5 for a slower count. Update both counter blocks if both formats should use the same timing. Change textContent: 0 only when you want a different starting value.
To change the scroll trigger: edit start: "top 90%". For example, "top 75%" starts later as the element moves farther into view. once: true limits the trigger to one run per page load; setting it to false alone does not define a replay animation. A repeat-on-scroll effect requires explicit reset and toggle behaviour.
Formatting note: cc-coma calls toLocaleString(), so grouping follows the visitor’s locale. Its current update callback also reads the formatted text with parseInt(); grouped values such as 1,000 can be parsed incorrectly on later updates. Use cc-integer for reliable unformatted counts, and have a developer revise the numeric-state formatting before relying on grouped large values. Decimal counters are not supported by the current integer snapping and parseInt logic.
How to edit the marquees
The initMarquee function measures the first matching element’s scrollWidth and animates horizontal x movement by that width. ease: "none" maintains a constant speed and repeat: -1 repeats indefinitely. The modifier wraps the movement. Matching content must have the correct repeated layout for the loop to appear seamless.
The actual footer calls are initMarquee(".funds-marquee-items", 30, "rtl"), initMarquee(".production-marquee-items", 70, "rtl"), and initMarquee(".testimonial-marquee-left", 40, "ltr"). The second argument is the loop duration in seconds: increase it to slow the row down or decrease it to speed it up. The third argument is direction: "rtl" moves right to left; "ltr" moves left to right. If no matching class exists on a page, that call has no visible effect.
Edit marquee text, images, and repeated items in Designer or their connected CMS collection. Preserve the row structure and repeat matching content where needed. If you rename a row class, update its selector in the footer. The current function measures width at initialization; reload the published page after replacing content. It does not include pause-on-hover behaviour.
// ───── MARQUEES ─────
try {
function initMarquee(selector, duration = 25, direction = "rtl") {
const marqueeItems = document.querySelectorAll(selector);
if (marqueeItems.length > 0) {
const totalWidth = marqueeItems[0].scrollWidth;
const fromX = direction === "ltr" ? -totalWidth : 0;
const toX = direction === "ltr" ? 0 : -totalWidth;
gsap.fromTo(selector, { x: fromX }, {
x: toX, duration, ease: "none", repeat: -1,
modifiers: { x: gsap.utils.unitize(x => parseFloat(x) % totalWidth) }
});
}
}
initMarquee(".funds-marquee-items", 30, "rtl");
initMarquee(".production-marquee-items", 70, "rtl");
initMarquee(".testimonial-marquee-left", 40, "ltr");
} catch (e) { console.error("Marquee error:", e); }
// ───── COUNTERS ─────
try {
document.querySelectorAll(".cc-coma").forEach((el) => {
gsap.from(el, {
textContent: 0, duration: 3, snap: { textContent: 1 },
scrollTrigger: { trigger: el, start: "top 90%", once: true },
onUpdate: function () { el.textContent = parseInt(el.textContent).toLocaleString(); },
});
});
document.querySelectorAll(".cc-integer").forEach((el) => {
gsap.from(el, {
textContent: 0, duration: 3, snap: { textContent: 1 },
scrollTrigger: { trigger: el, start: "top 90%", once: true },
onUpdate: function () { el.textContent = parseInt(el.textContent); },
});
});
} catch (e) { console.error("Counter error:", e); }Lenis smooth scroll implementation
Lenis is a separate smooth-scrolling library, not a GSAP animation. Its loader and initialization are in the same site-wide Footer code, before the marquee and counter script. The initialization returns early on devices matching (hover: none), so those devices keep native scrolling.
The configuration contains duration: 1.2, a custom easing function, and lerp: 0.1. This version uses lerp-based interpolation when lerp is supplied, so changing duration alone may not change the feel. Adjust lerp carefully: a lower value produces more smoothing and a higher value responds more directly. Keep the requestAnimationFrame loop, ScrollTrigger.update() callback, and resize listeners intact.
To remove smooth scrolling, remove the Lenis loader and its initialization block together, while preserving the separate GSAP marquee/counter script and required GSAP libraries. The site footer updates ScrollTrigger directly; use that current implementation rather than the older scroll-event dispatch shown in previous documentation.
Save, publish, and test
Save Site Settings after editing executable code, then publish to the Webflow staging domain and test there. Custom footer scripts may not run on the Designer canvas. Reload, scroll to the counter, and confirm the final number, trigger position, formatting, and marquee direction. Test desktop, tablet, and mobile; check the browser console for missing GSAP or ScrollTrigger errors. Avoid installing the same initialization twice or combining a custom tween with a native interaction that changes the same property.
<script src="https://cdn.jsdelivr.net/npm/@studio-freight/lenis@1.0.42/dist/lenis.min.js"></script>
<script>
window.Webflow = window.Webflow || [];
window.Webflow.push(function () {
if (window.matchMedia('(hover: none)').matches) return;
var lenis = new Lenis({
duration: 1.2,
easing: function (t) { return 1 - Math.pow(1 - t, 4); },
smoothTouch: false,
normalizeWheel: false,
lerp: 0.1,
});
// RAF loop
(function tick(t) { lenis.raf(t); requestAnimationFrame(tick); })(0);
// Keep GSAP ScrollTrigger synchronized
lenis.on('scroll', function () {
if (window.ScrollTrigger) window.ScrollTrigger.update();
});
// Fix: recalculate Lenis scroll height after all images/fonts load
// This prevents the white gap caused by late-loading content
window.addEventListener('load', function () {
lenis.resize();
});
// Fix: recalculate when any image on the page finishes loading
document.querySelectorAll('img').forEach(function (img) {
if (!img.complete) {
img.addEventListener('load', function () { lenis.resize(); });
}
});
// Fix: recalculate on window resize
window.addEventListener('resize', function () { lenis.resize(); });
});
</script>.webp)