Line 96: | Line 96: | ||
<script> | <script> | ||
window.addEventListener('scroll', () => { | window.addEventListener('scroll', () => { | ||
− | var h = document.getElementById('topHeader'); | + | // var h = document.getElementById('topHeader'); |
− | height = h.clientHeight; | + | // height = h.clientHeight; |
+ | var h = scrollBar.scroll.position; | ||
+ | console.log(h); | ||
let header = document.querySelector('header'); | let header = document.querySelector('header'); | ||
let logo = document.querySelector('.logo'); | let logo = document.querySelector('.logo'); |