Team:DTU-Denmark/Templates/StartPage

From 2013.igem.org

(Difference between revisions)
 
(4 intermediate revisions not shown)
Line 28: Line 28:
     <!-- Navigation scroll follow -->
     <!-- Navigation scroll follow -->
     <script type="text/javascript">
     <script type="text/javascript">
-
         $(window).scroll(function () {  
+
        var prevScrollPos = -1000;
 +
         $(window).scroll(function () {
 +
           
 +
            <!-- here is added table of content fixing to screen : was all 35 with Title OutsideWhitebox-->
 +
            var scrollPos = Math.floor($(window).scrollTop());
-
<!-- here is added table of content fixing to screen : was all 35 with Title OutsideWhitebox-->
+
             if(Math.abs(prevScrollPos - scrollPos) <= 1){
-
             var scrollPos = $(window).scrollTop();
+
                  return "nuthin";
 +
            }
 +
 
             var toc_margin_from_top = $(".navigation").height() + 35;
             var toc_margin_from_top = $(".navigation").height() + 35;
Line 54: Line 60:
             if(scroll_pos_above_menubar){
             if(scroll_pos_above_menubar){
-
                   $(".navigation").offset({top: 440 });
+
                   $(".navigation").offset({top: 250 });
             } else {
             } else {
                   $(".navigation").offset({top: scrollPos});
                   $(".navigation").offset({top: scrollPos});

Latest revision as of 21:54, 4 October 2013