Team:DTU-Denmark/Templates/StartPage
From 2013.igem.org
(Difference between revisions)
Line 21: | Line 21: | ||
<script> | <script> | ||
$(function() { | $(function() { | ||
- | + | // initialize scrollable | |
- | + | $(".scrollable").scrollable().navigator(); | |
}); | }); | ||
</script> | </script> | ||
Line 29: | Line 29: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
$(window).scroll(function () { | $(window).scroll(function () { | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
+ | <!-- here is added table of content fixing to screen : was all 35 with Title OutsideWhitebox--> | ||
+ | var navigation_margin_from_top = 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; | ||
Line 51: | Line 46: | ||
$(".toc").offset({top: scrollPos + toc_margin_from_top}); | $(".toc").offset({top: scrollPos + toc_margin_from_top}); | ||
} | } | ||
+ | <!-- new attempt to fix menubar (jakob) --> | ||
+ | if(scroll_pos_above_start_of_article){ | ||
+ | $(".navigation").offset({top: $(".whitebox.article").offset().top }); | ||
+ | } else { | ||
+ | $(".navigation").offset({top: scrollPos}); | ||
+ | } | ||
//if (scroll_pos_below_start_of_article){ //&& (scrollPos < $(document).height() - $(".navigation")[0].height() - 70)) { | //if (scroll_pos_below_start_of_article){ //&& (scrollPos < $(document).height() - $(".navigation")[0].height() - 70)) { |
Revision as of 18:05, 4 October 2013