🔴 Use correct variables name and fix top navigation

This commit is contained in:
Ines Montani 2016-10-19 01:22:53 +02:00
parent 622b0a9674
commit 4f41a065fe

View File

@ -24,8 +24,8 @@ const $$ = document.querySelectorAll.bind(document);
scrollUp = newScrollY <= scrollY; scrollUp = newScrollY <= scrollY;
scrollY = newScrollY; scrollY = newScrollY;
if(scrollUp && !(isNaN(scrollY) || scrollY <= vh)) topnav.classList.add('is-fixed'); if(scrollUp && !(isNaN(scrollY) || scrollY <= vh)) nav.classList.add('is-fixed');
else if(!scrollUp || (isNaN(scrollY) || scrollY <= vh/2)) topnav.classList.remove('is-fixed'); else if(!scrollUp || (isNaN(scrollY) || scrollY <= vh/2)) nav.classList.remove('is-fixed');
} }
const updateSidebar = () => { const updateSidebar = () => {