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
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan
Validation - Website
Validates URLs using regex and handles validation on input blur.
By Jared Malan
Rive Input - Update Number
This code lets you update the value of a Rive number input variable.
By Jeff McAvoy
Click Something Based on ID in URL
Automatically triggers a click on an element if URL hash matches "#example".
By Corey Moen
Fetch - Delete
Delete a resource via API using JavaScript's fetch with DELETE method.
By Jared Malan
Refresh after form submit
Automatically refreshes the page 7 seconds after any form submission.
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
Pointer events
CSS classes to control pointer events: .pointer-events-off disables interactions, .pointer-events-on enables interactions.
By Jared Malan
Handle Resize
Optimizes window resize handling by debouncing rerendering of elements.
By Jared Malan
Select Radio on Load
Trigger parent element click based on radio button value.
By Jared Malan
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
By Jared Malan
Animated American Flag
Render and animate an American flag on a canvas with dynamic waving effects.
By Jared Malan
Page Change Click Delay
Delay anchor navigation by 500ms for specific classes to allow processes like animations.
By Corey Moen
Get localStorage
Retrieve and parse surfers data from localStorage.
By Jared Malan
Fix Paragraph Runts With Nonbreaking Space
Prevent single-word runts in HTML elements with the class `.no-runt`.
By Corey Moen
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Back to Previous Page Button
Navigate browser history with custom buttons using jQuery.
By Corey Moen