Team:SDU-Denmark/core/header

From 2013.igem.org

(Difference between revisions)
Line 11: Line 11:
             $('#menubar').css("background", "transparent");   
             $('#menubar').css("background", "transparent");   
         });
         });
-
        $(window).scroll(function() {
 
-
          var fixadent = $("#top"), pos = fixadent.offset();
 
-
          if($(this).scrollTop() > (pos.top + 10)) {
 
-
            if (fixadent.css('position') == 'static') {     
 
-
                fixadent.addClass('fixedtop');
 
-
            }
 
-
          }
 
-
          else if($(this).scrollTop() <= pos.top) {
 
-
            if (fixadent.hasClass('fixedtop')) {
 
-
                fixadent.removeClass('fixedtop');
 
-
            }
 
-
          }
 
-
        });
 
     })
     })
</script>
</script>

Revision as of 20:11, 4 August 2013