From 4f41a065fe8414636dd1bef0b8521ec872f23c76 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Wed, 19 Oct 2016 01:22:53 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=B4=20Use=20correct=20variables=20name?= =?UTF-8?q?=20and=20fix=20top=20navigation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/assets/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/assets/js/main.js b/website/assets/js/main.js index 075d258e3..14a4ff7af 100644 --- a/website/assets/js/main.js +++ b/website/assets/js/main.js @@ -24,8 +24,8 @@ const $$ = document.querySelectorAll.bind(document); scrollUp = newScrollY <= scrollY; scrollY = newScrollY; - if(scrollUp && !(isNaN(scrollY) || scrollY <= vh)) topnav.classList.add('is-fixed'); - else if(!scrollUp || (isNaN(scrollY) || scrollY <= vh/2)) topnav.classList.remove('is-fixed'); + if(scrollUp && !(isNaN(scrollY) || scrollY <= vh)) nav.classList.add('is-fixed'); + else if(!scrollUp || (isNaN(scrollY) || scrollY <= vh/2)) nav.classList.remove('is-fixed'); } const updateSidebar = () => {