Team:SDU-Denmark/core/header

From 2013.igem.org

(Difference between revisions)
Line 5: Line 5:
<script type="text/javascript">
<script type="text/javascript">
function sticky_relocate() {
function sticky_relocate() {
-
  var viewportHeight = $(window).height();
+
        var viewportHeight = $(window).height();
-
  var totalPageHeight = $(document).height();
+
        var totalPageHeight = $(document).height();
 +
        if (totalPageHeight > viewportHeight ) {
 +
          $(".MainLayout").css("margin-bottom", "200px");
 +
        }
 +
        else {
 +
          $(".MainLayout").css("margin-bottom", "0");
 +
        } 
 +
 
     var window_top = $(window).scrollTop();
     var window_top = $(window).scrollTop();
     var div_top = $('#sticky-anchor').offset().top;
     var div_top = $('#sticky-anchor').offset().top;
Line 25: Line 32:
             $('#menubar').css("background", "transparent");   
             $('#menubar').css("background", "transparent");   
         });
         });
 +
       
 +
 
         $(window).scroll(sticky_relocate);
         $(window).scroll(sticky_relocate);
     });
     });

Revision as of 16:31, 10 August 2013