Click Something Based on ID in URL
Automatically triggers a click on an element if URL hash matches "#example".
By Corey Moen
Bind function to window
Defines an empty global function doSomethingInAnotherFile.
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
Set Hidden Input Value From URL Parameters
Retrieve URL parameter and set it to a hidden input field.
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
Validation - LinkedIn URL
Validate LinkedIn URLs and handle input validation on blur event.
By Jared Malan
Expand text on click
Toggle visibility of text sections with "Read More" buttons using JavaScript.
By Andrea Morgan
Validation - Email
Validates email format and handles invalid input on blur event.
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
Select Radio on Load
Trigger parent element click based on radio button value.
By Jared Malan
Remove https:// From Text Link
Remove protocols from anchor texts using jQuery.
By Miodrag Jovanovic
Navbar color change depending on hovered section
Dynamically update element colors on scroll based on visible section attributes.
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
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
Random Content
Dynamically loads HTML content based on a random number to enhance user experience.
By Jared Malan
Get localStorage
Retrieve and parse surfers data from localStorage.
By Jared Malan
Auto-collapse accordion in Webflow
Toggle accordion elements with a click, ensuring only one can be open at a time.
By Digipop
Rive Input - Update Boolean
Set a boolean Rive input to true or false
By Jeff McAvoy