Click Something When Pressing ESC Key
Triggers a click on a specified element when the 'Escape' key is pressed.
By Corey Moen
Validation - LinkedIn URL
Validate LinkedIn URLs and handle input validation on blur event.
By Jared Malan
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan
Fix Paragraph Runts With Nonbreaking Space
Prevent single-word runts in HTML elements with the class `.no-runt`.
By Corey Moen
Auto-collapse accordion in Webflow
Toggle accordion elements with a click, ensuring only one can be open at a time.
By Digipop
Get localStorage
Retrieve and parse surfers data from localStorage.
By Jared Malan
Select Radio on Load
Trigger parent element click based on radio button value.
By Jared Malan
Refresh after form submit
Automatically refreshes the page 7 seconds after any form submission.
By Corey Moen
Rive - Set Text Run Value
Update the string of text used in a Rive text run at runtime
By Jeff McAvoy
Interactive Squares
Create a dynamic grid of elements that react to mouse movement, simulating a swarm-like effect.
By Jared Malan
Handle Resize
Optimizes window resize handling by debouncing rerendering of elements.
By Jared Malan
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Reveal Words on Scroll
Animate text on scroll with GSAP, ScrollTrigger, and SplitType.
By Witt Langstaff
Fetch - Post
This code sends a POST request with JSON data to a specific URL, processes the JSON response, and handles any errors.
By Jared Malan
Hide scrollbars
CSS class to hide scrollbars
By Jared Malan
Pointer events
CSS classes to control pointer events: .pointer-events-off disables interactions, .pointer-events-on enables interactions.
By Jared Malan
Number to Currency
Formats a string input as US dollar currency without decimal places.
By Jared Malan
Validation - Website
Validates URLs using regex and handles validation on input blur.
By Jared Malan