Team:DTU-Denmark/Templates/StartPage

From 2013.igem.org

(Difference between revisions)
Line 35: Line 35:
             var toc_margin_from_top = $(".navigation").height() + 35;
             var toc_margin_from_top = $(".navigation").height() + 35;
             var scroll_pos_above_start_of_article = scrollPos < $(".whitebox.article").offset().top - 68;
             var scroll_pos_above_start_of_article = scrollPos < $(".whitebox.article").offset().top - 68;
 +
            var scroll_pos_above_start_of_article_2 = scrollPos < $(".whitebox.article").offset().top - 78;
             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 );
Line 49: Line 50:
<!-- new attempt to fix menubar (jakob) -->
<!-- new attempt to fix menubar (jakob) -->
-
             if(scroll_pos_above_start_of_article){
+
             if(scroll_pos_above_start_of_article_2){
                   $(".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 18:59, 4 October 2013