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
Random Content
Dynamically loads HTML content based on a random number to enhance user experience.
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
GSAP card staggered animation
Animate elements on viewport entry with GSAP and ScrollTrigger.
By Digipop
Rive Input - Update Number
This code lets you update the value of a Rive number input variable.
By Jeff McAvoy
Validation - Email
Validates email format and handles invalid input on blur event.
By Jared Malan
Print Page Button
Trigger browser print dialog on clicking element with ID 'print'.
By Digipop
Pause/Reset Video Embed on Click
Stops all iframe videos by resetting their source on '.close-video' button click.
By Corey Moen
Improved Font Rendering
CSS for font smoothing, text rendering, and scroll behavior on the body element.
By Jared Malan
Lenis Smooth Scrolling
Smooth scrolling setup using Lenis library with scroll event logging.
By Jared Malan
Click Something When Pressing ESC Key
Triggers a click on a specified element when the 'Escape' key is pressed.
By Corey Moen
Set Hidden Input Value From URL Parameters
Retrieve URL parameter and set it to a hidden input field.
By Corey Moen
Number to Currency
Formats a string input as US dollar currency without decimal places.
By Jared Malan
Remove https:// From Text Link
Remove protocols from anchor texts using jQuery.
By Miodrag Jovanovic
Filter Out Selection
Filter array elements matching button text on button click.
By Jared Malan
Expand text on click
Toggle visibility of text sections with "Read More" buttons using JavaScript.
By Andrea Morgan
Rive Input - Create Variable by Name
Create a variable for your state machine inputs by input name.
By Jeff McAvoy
Interactive Squares
Create a dynamic grid of elements that react to mouse movement, simulating a swarm-like effect.
By Jared Malan