Line 36: | Line 36: | ||
var currentScrollPos = window.pageYOffset; | var currentScrollPos = window.pageYOffset; | ||
if (prevScrollpos > currentScrollPos) { | if (prevScrollpos > currentScrollPos) { | ||
− | document.getElementById("navbar").style.top = " | + | document.getElementById("navbar").style.top = "10px"; |
$(".dropdown").removeClass("nomouse"); | $(".dropdown").removeClass("nomouse"); | ||
if(!$(".dropdown").is(":visible")) | if(!$(".dropdown").is(":visible")) | ||
Line 46: | Line 46: | ||
} else { | } else { | ||
if($(".navigation").hasClass("open"))if(!$(".dropdown").is(":visible")){return;} | if($(".navigation").hasClass("open"))if(!$(".dropdown").is(":visible")){return;} | ||
− | document.getElementById("navbar").style.top = "- | + | document.getElementById("navbar").style.top = "-45px"; |
$(".dropdown").addClass("nomouse"); | $(".dropdown").addClass("nomouse"); | ||
$(".navigation").hide(); | $(".navigation").hide(); |
Revision as of 07:21, 13 October 2018