Handle Resize
Optimizes window resize handling by debouncing rerendering of elements.
By Jared Malan
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
Tabs switch on hover
JavaScript code for a hover-based tab interface with dynamic content display.
By Andrea Morgan
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
Fetch - Put
Update server resource via PUT request using Fetch API.
By Jared Malan
Interactive Squares
Create a dynamic grid of elements that react to mouse movement, simulating a swarm-like effect.
By Jared Malan
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
Lenis Smooth Scrolling
Smooth scrolling setup using Lenis library with scroll event logging.
By Jared Malan
Rive Input - Update Boolean
Set a boolean Rive input to true or false
By Jeff McAvoy
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
By Jared Malan
Expand text on click
Toggle visibility of text sections with "Read More" buttons using JavaScript.
By Andrea Morgan
Fetch - Delete
Delete a resource via API using JavaScript's fetch with DELETE method.
By Jared Malan
Validation - Email
Validates email format and handles invalid input on blur event.
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
Back to Previous Page Button
Navigate browser history with custom buttons using jQuery.
By Corey Moen
Validation - Phone
Validates phone number format and handles errors on input field blur.
By Jared Malan
Progress Bar Timer
JavaScript code to dynamically update a progress bar based on time between two dates.
By Digipop