Filter Out Selection
Filter array elements matching button text on button click.
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
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Get localStorage
Retrieve and parse surfers data from localStorage.
By Jared Malan
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Random Content
Dynamically loads HTML content based on a random number to enhance user experience.
By Jared Malan
Animated American Flag
Render and animate an American flag on a canvas with dynamic waving effects.
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
Improved Font Rendering
CSS for font smoothing, text rendering, and scroll behavior on the body element.
By Jared Malan
Greenhouse
Fetches and displays job listings from Greenhouse API, with department-based filtering.
By Green Malan
Print Page Button
Trigger browser print dialog on clicking element with ID 'print'.
By Digipop
Auto-collapse accordion in Webflow
Toggle accordion elements with a click, ensuring only one can be open at a time.
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
Click Something Based on ID in URL
Automatically triggers a click on an element if URL hash matches "#example".
By Corey Moen
Set Hidden Input Value From URL Parameters
Retrieve URL parameter and set it to a hidden input field.
By Corey Moen
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
Lenis Smooth Scrolling
Smooth scrolling setup using Lenis library with scroll event logging.
By Jared Malan
Fetch - Put
Update server resource via PUT request using Fetch API.
By Jared Malan