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