Interactive Squares
Create a dynamic grid of elements that react to mouse movement, simulating a swarm-like effect.
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
Get localStorage
Retrieve and parse surfers data from localStorage.
By Jared Malan
Pointer events
CSS classes to control pointer events: .pointer-events-off disables interactions, .pointer-events-on enables interactions.
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
Validation - Email
Validates email format and handles invalid input on blur event.
By Jared Malan
Rive Input - Update Boolean
Set a boolean Rive input to true or false
By Jeff McAvoy
Fetch - Put
Update server resource via PUT request using Fetch API.
By Jared Malan
Print Page Button
Trigger browser print dialog on clicking element with ID 'print'.
By Digipop
Navbar color change depending on hovered section
Dynamically update element colors on scroll based on visible section attributes.
By Digipop
Number to Currency
Formats a string input as US dollar currency without decimal places.
By Jared Malan
Validation - Phone
Validates phone number format and handles errors on input field blur.
By Jared Malan
Page Change Click Delay
Delay anchor navigation by 500ms for specific classes to allow processes like animations.
By Corey Moen
Animated American Flag
Render and animate an American flag on a canvas with dynamic waving effects.
By Jared Malan
Hide element if collection is empty
Hide sections based on dynamic content state using jQuery.
By Corey Moen
Wes Pagination
A JavaScript script for handling pagination on a webpage by fetching and displaying content from the next or previous page without reloading the page.
By Jared Malan
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan