Team:NTU-Taida/Templates/Footer
From 2013.igem.org
(Difference between revisions)
Line 150: | Line 150: | ||
if (scrollTop >= subnavTop && !isFixed) { | if (scrollTop >= subnavTop && !isFixed) { | ||
isFixed = 1; | isFixed = 1; | ||
- | $ | + | $content.addClass('subnav-fixed'); |
$body.css('margin-top', marginTop + subnavHeight + 'px'); | $body.css('margin-top', marginTop + subnavHeight + 'px'); | ||
} else if (scrollTop <= subnavTop && isFixed) { | } else if (scrollTop <= subnavTop && isFixed) { | ||
isFixed = 0; | isFixed = 0; | ||
$nav.removeClass('subnav-fixed'); | $nav.removeClass('subnav-fixed'); | ||
- | $ | + | $content.css('margin-top', marginTop + 'px'); |
} | } | ||
} | } |
Revision as of 13:28, 1 August 2013