Team:Grenoble/script
From 2011.igem.org
(Difference between revisions)
Maxime.huet (Talk | contribs) |
Maxime.huet (Talk | contribs) |
||
Line 16: | Line 16: | ||
$(window).scroll(function () { | $(window).scroll(function () { | ||
var scrollPos = $(window).scrollTop(); | var scrollPos = $(window).scrollTop(); | ||
- | if (scrollPos > | + | if (scrollPos > 155) { |
$(".navigation").addClass("stickToTop"); | $(".navigation").addClass("stickToTop"); | ||
} else { | } else { | ||
$(".navigation").removeClass("stickToTop"); | $(".navigation").removeClass("stickToTop"); | ||
} | } | ||
- | + | if (scrollPos > 180) { | |
- | + | ||
- | + | ||
- | + | ||
- | if (scrollPos > 180) { | + | |
$(".toc").addClass("stickBelowNavigation"); | $(".toc").addClass("stickBelowNavigation"); | ||
} else { | } else { | ||
$(".toc").removeClass("stickBelowNavigation"); | $(".toc").removeClass("stickBelowNavigation"); | ||
} | } | ||
- | + | }); | |
+ | </script> | ||
<!-- Sexy Drop Down (drop down navigation) --> | <!-- Sexy Drop Down (drop down navigation) --> | ||
<script type="text/javascript"> | <script type="text/javascript"> |
Revision as of 20:21, 24 October 2011