Template:Team:SCUT/mainhead

From 2014.igem.org

(Difference between revisions)
Line 167: Line 167:
   .navihead img{width:200px;height:auto;}
   .navihead img{width:200px;height:auto;}
   .navibody{display:none;border:1px solid #66cce9;}
   .navibody{display:none;border:1px solid #66cce9;}
 +
  .navibody1{display:block;}
   .navibody p{margin:20px;line-height:30px;}
   .navibody p{margin:20px;line-height:30px;}
    
    
Line 277: Line 278:
 +
<script type="text/javascript">
 +
$(document).ready(function(){
 +
$(".navihead").mouseover(function(){
 +
$(this).next(".navibody").slideDown().siblings(".navibody").slideUp();
 +
});
 +
});
 +
</script>
 +
<script type="text/javascript">
 +
$(document).ready(function(){
 +
var element = $("#left");
 +
var top = element.position().top;
 +
var pos = element.css("position");
 +
$(window).scroll(function(){
 +
var scrolls = $(this).scrollTop() + 150;
 +
if(scrolls > top)
 +
{
 +
element.css({"position":"fixed","top":"150px"});
 +
}
 +
else
 +
{
 +
element.css({"position":pos,"top":top});
 +
}
 +
});
 +
       
 +
});
 +
</script>
</BODY>
</BODY>
</HTML>
</HTML>

Revision as of 09:26, 7 October 2014