~xdavidwu/xdavidwu.link

a4c4f1a862e94eedd72ed202c053e0ce2b642dc0 — xdavidwu 2 years ago 5f52798
js: run greedy nav after load
1 files changed, 2 insertions(+), 5 deletions(-)

M assets/js/nav.js
M assets/js/nav.js => assets/js/nav.js +2 -5
@@ 47,14 47,11 @@ function check() {
}

// Window listeners
window.addEventListener('resize', () => {
  check();
});
window.addEventListener('resize', check);

$btn.addEventListener('click', () => {
  $hlinks.classList.toggle('hidden');
  $btn.classList.toggle('close');
});

check();

window.addEventListener('load', check);