Team:Grenoble-EMSE-LSU/Templates/Home

From 2013.igem.org

(Difference between revisions)
Line 37: Line 37:
$(document).ready(function () {
$(document).ready(function () {
-
  var top = $('#Home').offset().top - parseFloat($('#Home').css('marginTop').replace(/auto/, 0));
+
  var top = $('#scroll').offset().top - parseFloat($('#scroll').css('marginTop').replace(/auto/, 0));
  $(window).scroll(function (event) {
  $(window).scroll(function (event) {
   var y = $(this).scrollTop();
   var y = $(this).scrollTop();
   if (y >= top) {
   if (y >= top) {
-
     $('#Home').addClass('fixed');
+
     $('#scroll').addClass('fixed');
   } else {
   } else {
-
     $('#Home').removeClass('fixed');
+
     $('#scroll').removeClass('fixed');
   }
   }
  });
  });

Revision as of 14:11, 20 August 2013

Grenoble-EMSE-LSU, iGEM


Retrieved from "http://2013.igem.org/Team:Grenoble-EMSE-LSU/Templates/Home"