Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan
Select Radio on Load
Trigger parent element click based on radio button value.
By Jared Malan
Hide element if collection is empty
Hide sections based on dynamic content state using jQuery.
By Corey Moen
Random Content
Dynamically loads HTML content based on a random number to enhance user experience.
By Jared Malan
Handle Resize
Optimizes window resize handling by debouncing rerendering of elements.
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
Back to Previous Page Button
Navigate browser history with custom buttons using jQuery.
By Corey Moen
Fetch - Put
Update server resource via PUT request using Fetch API.
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
Refresh after form submit
Automatically refreshes the page 7 seconds after any form submission.
By Corey Moen
Navbar color change depending on hovered section
Dynamically update element colors on scroll based on visible section attributes.
By Digipop
Expand text on click
Toggle visibility of text sections with "Read More" buttons using JavaScript.
By Andrea Morgan
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
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
Rive Input - Update Number
This code lets you update the value of a Rive number input variable.
By Jeff McAvoy
Basic scrollTrigger setup
Animate elements based on scroll position using GSAP and ScrollTrigger.
By Digipop
Set Hidden Input Value From URL Parameters
Retrieve URL parameter and set it to a hidden input field.
By Corey Moen