Bind function to window
Defines an empty global function doSomethingInAnotherFile.
By Jared Malan
Refresh after form submit
Automatically refreshes the page 7 seconds after any form submission.
By Corey Moen
Pause/Reset Video Embed on Click
Stops all iframe videos by resetting their source on '.close-video' button click.
By Corey Moen
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
Rive Instance
This code creates a new Rive animation, sets its properties, and starts playing it when it's loaded.
By Jeff McAvoy
Random Content
Dynamically loads HTML content based on a random number to enhance user experience.
By Jared Malan
Click Something When Pressing ESC Key
Triggers a click on a specified element when the 'Escape' key is pressed.
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
Copy to Clipboard
Copy text to clipboard on button click with visual feedback and console log.
By Jared Malan
Restart IX2
Reset, initialize, and prepare Webflow interactions for optimal functionality.
By Web Bae
Page Change Click Delay
Delay anchor navigation by 500ms for specific classes to allow processes like animations.
By Corey Moen
Ellipsis text
CSS class to truncate text with ellipsis when it overflows the container width.
By Jared Malan
Validation - Website
Validates URLs using regex and handles validation on input blur.
By Jared Malan
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan
Rive Input - Update Boolean
Set a boolean Rive input to true or false
By Jeff McAvoy
Rive - Set Text Run Value
Update the string of text used in a Rive text run at runtime
By Jeff McAvoy
Auto update copyright year
Dynamically updates an HTML element to display the current year using JavaScript.
By Digipop