Interactive Squares
Create a dynamic grid of elements that react to mouse movement, simulating a swarm-like effect.
By Jared Malan
Progress Bar Timer
JavaScript code to dynamically update a progress bar based on time between two dates.
By Digipop
Click Something When Pressing ESC Key
Triggers a click on a specified element when the 'Escape' key is pressed.
By Corey Moen
Rive - Set Text Run Value
Update the string of text used in a Rive text run at runtime
By Jeff McAvoy
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
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
By Jared Malan
Pointer events
CSS classes to control pointer events: .pointer-events-off disables interactions, .pointer-events-on enables interactions.
By Jared Malan
Auto update copyright year
Dynamically updates an HTML element to display the current year using JavaScript.
By Digipop
Remove https:// From Text Link
Remove protocols from anchor texts using jQuery.
By Miodrag Jovanovic
Bind function to window
Defines an empty global function doSomethingInAnotherFile.
By Jared Malan
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Hide scrollbars
CSS class to hide scrollbars
By Jared Malan
Validation - Website
Validates URLs using regex and handles validation on input blur.
By Jared Malan
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
Track User Localstorage
Tracks user navigation and populates a form field with the history.
By Jared Malan
Lenis Smooth Scrolling
Smooth scrolling setup using Lenis library with scroll event logging.
By Jared Malan
Rive Input - Create Variable by Name
Create a variable for your state machine inputs by input name.
By Jeff McAvoy