Template:Team:Berkeley/topnav.js
From 2013.igem.org
(Difference between revisions)
Line 4: | Line 4: | ||
} | } | ||
else { | else { | ||
- | $('# | + | $('#main-nav').css('top', 0); |
} | } | ||
} | } | ||
); | ); |
Revision as of 20:52, 24 October 2013
$(window).scroll(function () {
if ($(window).scrollTop() > 225) { $('#main-nav').css('top', $(window).scrollTop() - 225); } else { $('#main-nav').css('top', 0); }
} );