Team:Paris Bettencourt/header

From 2013.igem.org

(Difference between revisions)
Line 30: Line 30:
     // listen for scroll
     // listen for scroll
     var positionElementInPage = $('#menubarbleu').offset().top;
     var positionElementInPage = $('#menubarbleu').offset().top;
-
$(window).scroll(
+
    $(window).scroll(
-
    $(function() {
+
      $(function() {
-
if ($(window).scrollTop() >= positionElementInPage) {
+
    if ($(window).scrollTop() >= positionElementInPage) {
-
    // fixed
+
      // fixed
-
    $('#menubarbleu').addClass("sticky");
+
      $('#menubarbleu').addClass("sticky");
-
} else {
+
  } else {
-
    // relative
+
      // relative
-
    $('#menubarbleu').removeClass("sticky");
+
      $('#menubarbleu').removeClass("sticky");
-
}
+
  }
-
    })
+
      })
-
);
+
    );
</script>  
</script>  

Revision as of 09:36, 30 July 2013

   

    
    


   
    
      
    
    iGEM Paris Bettencourt 2013
    
    

    
    

     

    

        
    
    

    

    
    

Back to Top