Basic scrollTrigger setup
Animate elements based on scroll position using GSAP and ScrollTrigger.
By Digipop
Validation - LinkedIn URL
Validate LinkedIn URLs and handle input validation on blur event.
By Jared Malan
Richtext Reset
Removes top margin of the first and bottom margin of the last child elements in a rich text container.
By Jared Malan
Progress Bar Timer
JavaScript code to dynamically update a progress bar based on time between two dates.
By Digipop
Validation - Email
Validates email format and handles invalid input on blur event.
By Jared Malan
Auto update copyright year
Dynamically updates an HTML element to display the current year using JavaScript.
By Digipop
Get localStorage
Retrieve and parse surfers data from localStorage.
By Jared Malan
Pointer events
CSS classes to control pointer events: .pointer-events-off disables interactions, .pointer-events-on enables interactions.
By Jared Malan
Set Hidden Input Value From URL Parameters
Retrieve URL parameter and set it to a hidden input field.
By Corey Moen
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
Handle Resize
Optimizes window resize handling by debouncing rerendering of elements.
By Jared Malan
Rive - Set Text Run Value
Update the string of text used in a Rive text run at runtime
By Jeff McAvoy
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
Hide element if collection is empty
Hide sections based on dynamic content state using jQuery.
By Corey Moen
Back to Previous Page Button
Navigate browser history with custom buttons using jQuery.
By Corey Moen
Text Highlight Color
CSS code for high-contrast text selection: black background and white text.
By Jared Malan
Set localStorage
Store an array of surfer names in localStorage as a JSON string.
By Jared Malan
Number to Currency
Formats a string input as US dollar currency without decimal places.
By Jared Malan