Line 18: | Line 18: | ||
<style> | <style> | ||
+ | |||
+ | .scrolled{ | ||
+ | opacity: 0.3; | ||
+ | } | ||
.no-js #loader { display: none; } | .no-js #loader { display: none; } | ||
Line 539: | Line 543: | ||
</script> | </script> | ||
+ | <script> | ||
+ | function checkScroll(){ | ||
+ | var startY = window.innerHeight; //The point where the navbar changes in px | ||
+ | if($(window).scrollTop() > startY){ | ||
+ | $('nav > ul').addClass("scrolled"); | ||
+ | }else{ | ||
+ | $('nav > ul').removeClass("scrolled"); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | if($('nav > ul').length > 0){ | ||
+ | $(window).on("scroll load resize", function(){ | ||
+ | checkScroll(); | ||
+ | }); | ||
+ | } | ||
+ | </script> | ||
Revision as of 15:33, 24 August 2016