Basic scrollTrigger setup
Animate elements based on scroll position using GSAP and ScrollTrigger.
By Digipop
Expand text on click
Toggle visibility of text sections with "Read More" buttons using JavaScript.
By Andrea Morgan
Page Change Click Delay
Delay anchor navigation by 500ms for specific classes to allow processes like animations.
By Corey Moen
Track User Localstorage
Tracks user navigation and populates a form field with the history.
By Jared Malan
Print Page Button
Trigger browser print dialog on clicking element with ID 'print'.
By Digipop
Currency to Number
Convert currency string to number by removing non-digit characters and parsing to float. Throws error for invalid input.
By Jared Malan
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Rive Instance
This code creates a new Rive animation, sets its properties, and starts playing it when it's loaded.
By Jeff McAvoy
Get localStorage
Retrieve and parse surfers data from localStorage.
By Jared Malan
Validation - Email
Validates email format and handles invalid input on blur event.
By Jared Malan
Handle Resize
Optimizes window resize handling by debouncing rerendering of elements.
By Jared Malan
Bind function to window
Defines an empty global function doSomethingInAnotherFile.
By Jared Malan
Improved Font Rendering
CSS for font smoothing, text rendering, and scroll behavior on the body element.
By Jared Malan
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan
Random Content
Dynamically loads HTML content based on a random number to enhance user experience.
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
GSAP card staggered animation
Animate elements on viewport entry with GSAP and ScrollTrigger.
By Digipop
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
By Jared Malan