m |
m |
||
Line 149: | Line 149: | ||
if (window.matchMedia("(min-width: 768px)").matches) { | if (window.matchMedia("(min-width: 768px)").matches) { | ||
/* the viewport is at least 768pixels wide */ | /* the viewport is at least 768pixels wide */ | ||
− | if (document.body.scrollTop > | + | if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 300) { |
navigationBar.classList.add("opaque-nav"); | navigationBar.classList.add("opaque-nav"); | ||
} else { | } else { |
Revision as of 07:31, 6 October 2016