Set Hidden Input Value From URL Parameters
Retrieve URL parameter and set it to a hidden input field.
By Corey Moen
Bind function to window
Defines an empty global function doSomethingInAnotherFile.
By Jared Malan
Progress Bar Timer
JavaScript code to dynamically update a progress bar based on time between two dates.
By Digipop
Random Content
Dynamically loads HTML content based on a random number to enhance user experience.
By Jared Malan
Basic scrollTrigger setup
Animate elements based on scroll position using GSAP and ScrollTrigger.
By Digipop
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
Fix Paragraph Runts With Nonbreaking Space
Prevent single-word runts in HTML elements with the class `.no-runt`.
By Corey Moen
Rive Input - Create Variable by Name
Create a variable for your state machine inputs by input name.
By Jeff McAvoy
Navbar color change depending on hovered section
Dynamically update element colors on scroll based on visible section attributes.
By Digipop
Auto update copyright year
Dynamically updates an HTML element to display the current year using JavaScript.
By Digipop
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
Rive Input - Update Boolean
Set a boolean Rive input to true or false
By Jeff McAvoy
Hide scrollbars
CSS class to hide scrollbars
By Jared Malan
Validation - Phone
Validates phone number format and handles errors on input field blur.
By Jared Malan
Improved Font Rendering
CSS for font smoothing, text rendering, and scroll behavior on the body element.
By Jared Malan
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
By Jared Malan
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
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