Team:UCLondon/Templates/Header
From 2012e.igem.org
(Difference between revisions)
Line 102: | Line 102: | ||
$(window).scroll(function (event) { | $(window).scroll(function (event) { | ||
- | |||
var y = $(this).scrollTop(); | var y = $(this).scrollTop(); | ||
- | |||
if (y >= top) { | if (y >= top) { | ||
// if so, ad the fixed class | // if so, ad the fixed class | ||
- | $('# | + | $('#toc').addClass('fixed'); |
} else { | } else { | ||
- | + | $('#toc').removeClass('fixed'); | |
- | $('# | + | |
} | } | ||
}); | }); |
Revision as of 06:41, 16 September 2012