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
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan
Bind function to window
Defines an empty global function doSomethingInAnotherFile.
By Jared Malan
Fetch - Put
Update server resource via PUT request using Fetch API.
By Jared Malan
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
Handle Resize
Optimizes window resize handling by debouncing rerendering of elements.
By Jared Malan
Rive Instance
This code creates a new Rive animation, sets its properties, and starts playing it when it's loaded.
By Jeff McAvoy
Improved Font Rendering
CSS for font smoothing, text rendering, and scroll behavior on the body element.
By Jared Malan
Auto update copyright year
Dynamically updates an HTML element to display the current year using JavaScript.
By Digipop
Fetch - Delete
Delete a resource via API using JavaScript's fetch with DELETE method.
By Jared Malan
Track User Localstorage
Tracks user navigation and populates a form field with the history.
By Jared Malan
Greenhouse
Fetches and displays job listings from Greenhouse API, with department-based filtering.
By Green Malan
Rive Input - Update Number
This code lets you update the value of a Rive number input variable.
By Jeff McAvoy
Richtext Reset
Removes top margin of the first and bottom margin of the last child elements in a rich text container.
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
Basic scrollTrigger setup
Animate elements based on scroll position using GSAP and ScrollTrigger.
By Digipop
Expand text on click
Toggle visibility of text sections with "Read More" buttons using JavaScript.
By Andrea Morgan