Navbar color change depending on hovered section
Dynamically update element colors on scroll based on visible section attributes.
By Digipop
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan
Pause/Reset Video Embed on Click
Stops all iframe videos by resetting their source on '.close-video' button click.
By Corey Moen
Rive Input - Update Boolean
Set a boolean Rive input to true or false
By Jeff McAvoy
Basic scrollTrigger setup
Animate elements based on scroll position using GSAP and ScrollTrigger.
By Digipop
Lenis Smooth Scrolling
Smooth scrolling setup using Lenis library with scroll event logging.
By Jared Malan
Fetch - Get
A JavaScript code snippet that fetches data from a URL, converts the response to JSON, and logs the data or any error to the console.
By Jared Malan
Auto-collapse accordion in Webflow
Toggle accordion elements with a click, ensuring only one can be open at a time.
By Digipop
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Click Something Based on ID in URL
Automatically triggers a click on an element if URL hash matches "#example".
By Corey Moen
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Print Page Button
Trigger browser print dialog on clicking element with ID 'print'.
By Digipop
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
By Jared Malan
Set Hidden Input Value From URL Parameters
Retrieve URL parameter and set it to a hidden input field.
By Corey Moen
Interactive Squares
Create a dynamic grid of elements that react to mouse movement, simulating a swarm-like effect.
By Jared Malan
Richtext Reset
Removes top margin of the first and bottom margin of the last child elements in a rich text container.
By Jared Malan
Validation - Phone
Validates phone number format and handles errors on input field blur.
By Jared Malan
Validation - Email
Validates email format and handles invalid input on blur event.
By Jared Malan