Team:Copenhagen/Header

From 2012.igem.org

(Difference between revisions)
Line 43: Line 43:
height: 619px;
height: 619px;
}
}
 +
 +
 +
<script type="text/javascript" src="http://users.skumleren.net/gumle/lightbox/js/prototype.js"></script>
 +
  <script type="text/javascript" src="http://users.skumleren.net/gumle/lightbox/js/scriptaculous.js?load=effects,builder"></script>
 +
  <script type="text/javascript" src="http://users.skumleren.net/gumle/lightbox/js/lightbox.js"></script>
 +
  <link rel="stylesheet" href="http://users.skumleren.net/gumle/lightbox/css/lightbox.css" type="text/css" media="screen" />
 +
<script type="text/javascript" src="http://users.skumleren.net/gumle/lightbox/lightboxSEB.js"></script>
 +
 +
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" charset="utf-8"></script>
 +
<script type="text/javascript" charset="utf-8">
 +
var $j = jQuery.noConflict();
 +
jQuery(document).ready(function(){
 +
  var menu = $j('#scroller')
 +
  var pos = menu.position().top;
 +
  var offset = 20;
 +
 +
  $j(window).scroll(function(){
 +
    $j('#test').text(menu.position().top);
 +
    if(($j(this).scrollTop() + menu.height() + offset) > $j('#EndOfPage').position().top) {
 +
      menu.css("position", "absolute");
 +
      menu.css("top", ($j('#EndOfPage').position().top - menu.height()) + "px");
 +
    }else{
 +
 +
      if(($j(this).scrollTop() + offset) > pos) {
 +
        menu.css("position", "fixed");
 +
        menu.css("top", offset + "px");
 +
      }else{
 +
        menu.css("position", "relative");
 +
        menu.css("top", "0px");
 +
      }
 +
    }
 +
 +
 +
  });
 +
});
 +
</script>
#design1{
#design1{

Revision as of 20:55, 26 September 2012