Team:DTU-Denmark/Templates/StartPage

From 2013.igem.org

(Difference between revisions)
m
m
Line 37: Line 37:
<!-- here is added table of content fixing to screen -->
<!-- here is added table of content fixing to screen -->
 +
            var toc_margin_from_top = $(".navigation").height() + 10;
             var scroll_pos_above_start_of_article = scrollPos < $(".whitebox.article").offset().top + 35;
             var scroll_pos_above_start_of_article = scrollPos < $(".whitebox.article").offset().top + 35;
             var toc_end_reached_bottom_of_article = scrollPos + $(".toc").height() > $(".whitebox.article").offset().top + $(".whitebox.article").height();
             var toc_end_reached_bottom_of_article = scrollPos + $(".toc").height() > $(".whitebox.article").offset().top + $(".whitebox.article").height();
Line 45: Line 46:
                   $(".toc").offset({top: $(".whitebox.article").offset().top + $(".whitebox.article").height() - $(".toc").height() - 10});
                   $(".toc").offset({top: $(".whitebox.article").offset().top + $(".whitebox.article").height() - $(".toc").height() - 10});
             } else {
             } else {
-
                   $(".toc").offset({top: scrollPos + 35});
+
                   $(".toc").offset({top: scrollPos + toc_margin_from_top});
             }
             }

Revision as of 14:37, 22 July 2013

{{{1}}}