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

Line 100: Line 100:
 
         let headerHeight = $("header").height();
 
         let headerHeight = $("header").height();
  
         // var h = document.getElementById('topHeader');
+
         var h = document.getElementById('topHeader');
         // height = h.clientHeight;
+
         height = h.clientHeight;
        var height=0.7*pageHeight-headerHeight+5;
+
 
         let header = document.querySelector('header');
 
         let header = document.querySelector('header');
 
         let logoHolder = document.querySelector('.logoHolder');
 
         let logoHolder = document.querySelector('.logoHolder');
Line 109: Line 108:
 
         logoHolder.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);
 +
        logoAnim.playSegments([0,80],true);
 
     });
 
     });
  

Revision as of 06:33, 6 August 2021