Difference between revisions of "Team:Aalto-Helsinki/Results"
(modified the site navigation to be responsive) |
m (responsive navigation changes the active class before the header is on the top of the page) |
||
Line 148: | Line 148: | ||
if (windscroll >= 100) { | if (windscroll >= 100) { | ||
$('.inner-container section').each(function(i) { | $('.inner-container section').each(function(i) { | ||
− | if ($(this).position().top <= windscroll + | + | if ($(this).position().top <= windscroll + 140) { |
$('#sidenav a.active').removeClass('active'); | $('#sidenav a.active').removeClass('active'); | ||
$('#sidenav a').eq(i).addClass('active'); | $('#sidenav a').eq(i).addClass('active'); |
Revision as of 08:32, 25 August 2015