Lenis Smooth Scrolling
Smooth scrolling setup using Lenis library with scroll event logging.
By Jared Malan
GSAP card staggered animation
Animate elements on viewport entry with GSAP and ScrollTrigger.
By Digipop
Basic scrollTrigger setup
Animate elements based on scroll position using GSAP and ScrollTrigger.
By Digipop
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
By Jared Malan
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Fix Paragraph Runts With Nonbreaking Space
Prevent single-word runts in HTML elements with the class `.no-runt`.
By Corey Moen
Validation - Phone
Validates phone number format and handles errors on input field blur.
By Jared Malan
Click Something When Pressing ESC Key
Triggers a click on a specified element when the 'Escape' key is pressed.
By Corey Moen
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan
Refresh after form submit
Automatically refreshes the page 7 seconds after any form submission.
By Corey Moen
Remove https:// From Text Link
Remove protocols from anchor texts using jQuery.
By Miodrag Jovanovic
Load All CMS Items
This JavaScript code parses and displays CMS items from a webpage, storing them in an array and rendering them in a specified div.
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
Rive - Set Text Run Value
Update the string of text used in a Rive text run at runtime
By Jeff McAvoy
Get localStorage
Retrieve and parse surfers data from localStorage.
By Jared Malan
Fetch - Delete
Delete a resource via API using JavaScript's fetch with DELETE method.
By Jared Malan
Fetch - Put
Update server resource via PUT request using Fetch API.
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