Filter Out Selection
Filter array elements matching button text on button click.
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
Fix Paragraph Runts With Nonbreaking Space
Prevent single-word runts in HTML elements with the class `.no-runt`.
By Corey Moen
Pointer events
CSS classes to control pointer events: .pointer-events-off disables interactions, .pointer-events-on enables interactions.
By Jared Malan
Remove https:// From Text Link
Remove protocols from anchor texts using jQuery.
By Miodrag Jovanovic
Refresh after form submit
Automatically refreshes the page 7 seconds after any form submission.
By Corey Moen
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
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
Print Page Button
Trigger browser print dialog on clicking element with ID 'print'.
By Digipop
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
By Jared Malan
Navbar color change depending on hovered section
Dynamically update element colors on scroll based on visible section attributes.
By Digipop
Validation - Website
Validates URLs using regex and handles validation on input blur.
By Jared Malan
Pause/Reset Video Embed on Click
Stops all iframe videos by resetting their source on '.close-video' button click.
By Corey Moen
Rive Instance
This code creates a new Rive animation, sets its properties, and starts playing it when it's loaded.
By Jeff McAvoy
Tabs switch on hover
JavaScript code for a hover-based tab interface with dynamic content display.
By Andrea Morgan
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Rive Input - Update Number
This code lets you update the value of a Rive number input variable.
By Jeff McAvoy
Lenis Smooth Scrolling
Smooth scrolling setup using Lenis library with scroll event logging.
By Jared Malan