Expand text on click
Toggle visibility of text sections with "Read More" buttons using JavaScript.
By Andrea Morgan
Fetch - Delete
Delete a resource via API using JavaScript's fetch with DELETE method.
By Jared Malan
Validation - Website
Validates URLs using regex and handles validation on input blur.
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
Interactive Squares
Create a dynamic grid of elements that react to mouse movement, simulating a swarm-like effect.
By Jared Malan
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
Handle Resize
Optimizes window resize handling by debouncing rerendering of elements.
By Jared Malan
Rive Input - Update Boolean
Set a boolean Rive input to true or false
By Jeff McAvoy
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
Page Change Click Delay
Delay anchor navigation by 500ms for specific classes to allow processes like animations.
By Corey Moen
Fix Paragraph Runts With Nonbreaking Space
Prevent single-word runts in HTML elements with the class `.no-runt`.
By Corey Moen
Track User Localstorage
Tracks user navigation and populates a form field with the history.
By Jared Malan
Animated American Flag
Render and animate an American flag on a canvas with dynamic waving effects.
By Jared Malan
Auto update copyright year
Dynamically updates an HTML element to display the current year using JavaScript.
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
Tabs switch on hover
JavaScript code for a hover-based tab interface with dynamic content display.
By Andrea Morgan
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