Skip to content

Instantly share code, notes, and snippets.

View rodrigodagostino's full-sized avatar

Rodrigo D’Agostino rodrigodagostino

View GitHub Profile
@ohiosveryown
ohiosveryown / change-class-on-scroll.html
Last active May 9, 2024 16:56
Vanilla JS – change/add class based on scroll position.
// https://codepen.io/cmykw/pen/gemxJm
// layout
<nav/>
// style
<style>
body { min-height: 200vh; }
nav {