GenderDysphoria.fyi/js/_header.js

11 lines
241 B
JavaScript
Raw Permalink Normal View History

2020-02-20 14:38:25 -08:00
$(function () {
let active = false;
window.addEventListener('scroll', function () {
const state = window.scrollY > 10;
if (active !== state) {
$('header').toggleClass('active', state);
active = state;
}
});
});