Click Something When Pressing ESC Key
Triggers a click on a specified element when the 'Escape' key is pressed.
By Corey Moen
Fix Paragraph Runts With Nonbreaking Space
Prevent single-word runts in HTML elements with the class `.no-runt`.
By Corey Moen
Expand text on click
Toggle visibility of text sections with "Read More" buttons using JavaScript.
By Andrea Morgan
Track User Localstorage
Tracks user navigation and populates a form field with the history.
By Jared Malan
Auto update copyright year
Dynamically updates an HTML element to display the current year using JavaScript.
By Digipop
Rive - Set Text Run Value
Update the string of text used in a Rive text run at runtime
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
Page Change Click Delay
Delay anchor navigation by 500ms for specific classes to allow processes like animations.
By Corey Moen
Rive Input - Create Variable by Name
Create a variable for your state machine inputs by input name.
By Jeff McAvoy
Animated American Flag
Render and animate an American flag on a canvas with dynamic waving effects.
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
Basic scrollTrigger setup
Animate elements based on scroll position using GSAP and ScrollTrigger.
By Digipop
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
Validation - LinkedIn URL
Validate LinkedIn URLs and handle input validation on blur event.
By Jared Malan
Ellipsis text
CSS class to truncate text with ellipsis when it overflows the container width.
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
Set Hidden Input Value From URL Parameters
Retrieve URL parameter and set it to a hidden input field.
By Corey Moen