Team:DTU-Denmark/Templates/StartPage
From 2013.igem.org
(Difference between revisions)
Line 37: | Line 37: | ||
var toc_end_reached_bottom_of_article = scrollPos + toc_margin_from_top + $(".toc").height() > $(".whitebox.article").offset().top + $(".whitebox.article").height() - 35; | var toc_end_reached_bottom_of_article = scrollPos + toc_margin_from_top + $(".toc").height() > $(".whitebox.article").offset().top + $(".whitebox.article").height() - 35; | ||
var toc_margin_from_title = scrollPos < ($(".whitebox.article").offset().top ); | var toc_margin_from_title = scrollPos < ($(".whitebox.article").offset().top ); | ||
- | var menubar_margin_from_title = scrollPos < ($(".whitebox.article").offset().top ); | + | var menubar_margin_from_title = scrollPos < ($(".whitebox.article").offset().top - 35); |
if(scroll_pos_above_start_of_article){ | if(scroll_pos_above_start_of_article){ | ||
Line 52: | Line 52: | ||
if(scroll_pos_above_menubar){ | if(scroll_pos_above_menubar){ | ||
$(".navigation").offset({top: $(".whitebox.article").offset().top + $(".navigation")[0].height() }); | $(".navigation").offset({top: $(".whitebox.article").offset().top + $(".navigation")[0].height() }); | ||
- | } else if( | + | } else if(menubar_margin_from_title){ |
$(".navigation").offset({top: $(".whitebox.article").offset().top + $(".navigation")[0].height() }); | $(".navigation").offset({top: $(".whitebox.article").offset().top + $(".navigation")[0].height() }); | ||
} else { | } else { |
Revision as of 19:27, 4 October 2013