Difference between revisions of "Template:Oxford"

Line 193: Line 193:
 
   </div>
 
   </div>
 
</nav>
 
</nav>
 +
<script>
 +
//
 +
function checkScroll(){
 +
    var startY = 200; //The point where the navbar changes in px
 +
 +
    if($(window).scrollTop() > startY){
 +
        $('.navbar').addClass("scrolled");
 +
    }else{
 +
        $('.navbar').removeClass("scrolled");
 +
    }
 +
}
 +
 +
if($('.navbar').length > 0){
 +
    $(window).on("scroll load resize", function(){
 +
        checkScroll();
 +
    });
 +
}
 +
</script>

Revision as of 22:04, 31 October 2017