Helpful Scripts
setTimeout
setTimeout(() => {
// do something
}, 1500);setInterval
setInterval(function () {
// do something
}, 1500);Webflow Ready
Set cursor div to follow mouse position
When typing on a form field, set a text element to match field value
Do something on key press
Create a press and hold interaction
Copy to clipboard
HTML
jQuery
Add a 0 in front of any number that's less than 10
JavaScript matchMedia
Scroll to element on link click
Show one random item in your cms list
Add commas to number
Show a different div for each day of the week
Reload page on browser back button click
Run code on every page that hasn't been visited before
localStorage & sessionStorage
Query Parameters
Control videos
AJAX
Insert text into field while triggering any events attached to that field
Last updated