Team:Imperial/Resources/JS:subNav
From 2014.igem.org
(Difference between revisions)
Line 7: | Line 7: | ||
$(document).ready(function () { | $(document).ready(function () { | ||
$(window).bind('scroll', function () { | $(window).bind('scroll', function () { | ||
- | var navHeight = | + | var navHeight = 180; |
if ($(window).scrollTop() > navHeight) { | if ($(window).scrollTop() > navHeight) { | ||
$('#navWrap').addClass('fixed'); | $('#navWrap').addClass('fixed'); |
Revision as of 01:10, 18 October 2014
/**
************************************************************ *************** THIS IS THE NAVIGATION CODE **************** ************************************************************ **/
$(document).ready(function () {
$(window).bind('scroll', function () { var navHeight = 180; if ($(window).scrollTop() > navHeight) { $('#navWrap').addClass('fixed'); } else { $('#navWrap').removeClass('fixed'); } });
});