Skip to content
notejs

Snap On Snap

Play a 🫰(snap) when CSS snaps ! const snap = new Audio ( 'snap.mp3' ) scroller . onscrollsnapchange = () => snap .play () Demo · JS Snap API Note : you may need to click/tap before scrolling, for the browser to deem playing the audio as user activated.

AA
Oct 18, 20241 min read

lay a 🫰(snap) when CSS snaps ! const snap = new Audio ( 'snap.mp3' ) scroller . onscrollsnapchange = () => snap .play () Demo · JS Snap API Note : you may need to click/tap before scrolling, for the browser to deem playing the audio as user activated.

Did you enjoy this article?

Recommend it — Standard Reader surfaces well-loved writing to more readers across the network.

Across the AtmosphereDiscussions