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 - Get
A JavaScript code snippet that fetches data from a URL, converts the response to JSON, and logs the data or any error to the console.
By Jared Malan
Track User Localstorage
Tracks user navigation and populates a form field with the history.
By Jared Malan
Ellipsis text
CSS class to truncate text with ellipsis when it overflows the container width.
By Jared Malan
Interactive Squares
Create a dynamic grid of elements that react to mouse movement, simulating a swarm-like effect.
By Jared Malan
Random Content
Dynamically loads HTML content based on a random number to enhance user experience.
By Jared Malan
Validation - Phone
Validates phone number format and handles errors on input field blur.
By Jared Malan
Rive Input - Create Variable by Name
Create a variable for your state machine inputs by input name.
By Jeff McAvoy
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
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
Progress Bar Timer
JavaScript code to dynamically update a progress bar based on time between two dates.
By Digipop
Expand text on click
Toggle visibility of text sections with "Read More" buttons using JavaScript.
By Andrea Morgan
Auto update copyright year
Dynamically updates an HTML element to display the current year using JavaScript.
By Digipop
Pause/Reset Video Embed on Click
Stops all iframe videos by resetting their source on '.close-video' button click.
By Corey Moen
Validation - LinkedIn URL
Validate LinkedIn URLs and handle input validation on blur event.
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
Basic scrollTrigger setup
Animate elements based on scroll position using GSAP and ScrollTrigger.
By Digipop