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

Line 100: Line 100:
 
         height = h.clientHeight;
 
         height = h.clientHeight;
 
         let header = document.querySelector('header');
 
         let header = document.querySelector('header');
         let logo = document.querySelector('.logo');
+
         let logoHolder = document.querySelector('.logoHolder');
 
         let menuBtn = document.querySelector('.navbar-toggler')
 
         let menuBtn = document.querySelector('.navbar-toggler')
 
         header.classList.toggle('sticky', window.scrollY > height);
 
         header.classList.toggle('sticky', window.scrollY > height);
         logo.classList.toggle('sticky', window.scrollY > height);
+
         logoHolder.classList.toggle('sticky', window.scrollY > height);
 
         menuBtn.classList.toggle('sticky', window.scrollY > height);
 
         menuBtn.classList.toggle('sticky', window.scrollY > height);
 
     });
 
     });

Revision as of 09:58, 29 July 2021