Difference between revisions of "Template:XJTU-China/header"

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');

Revision as of 17:16, 11 July 2021