07-header.js 272 Bytes
Newer Older
minseok.park's avatar
minseok.park committed
1 2 3 4 5 6 7 8 9 10 11 12 13
;(function () {
  'use strict'

  document.addEventListener('scroll', function () {
    var navbar = document.querySelector('.navbar')

    if (window.scrollY > 0) {
      navbar.classList.add('active')
    } else {
      navbar.classList.remove('active')
    }
  })
})()