Team:MIT/Templates/header

From 2011.igem.org

(Difference between revisions)
Line 5: Line 5:
 +
<script type="text/javascript">
 +
$('#rightMenu a')
 +
.css( {backgroundPosition: "0 0"} )
 +
.mouseover(function(){
 +
$(this).stop().animate(
 +
{backgroundPosition:"(0 -250px)"},
 +
{duration:500})
 +
})
 +
.mouseout(function(){
 +
$(this).stop().animate(
 +
{backgroundPosition:"(0 0)"},
 +
{duration:500})
 +
})
 +
</script>
 +
<script type="text/javascript">
 +
$(function() {
 +
$("#button").toggle(
 +
function() {
 +
$("#effect").animate({backgroundColor: '#aa0000', color: '#fff', width: 500}, 1000);
 +
},
 +
function() {
 +
$("#effect").animate({backgroundColor: '#fff', color: '#000', width: 240}, 1000);
 +
}
 +
);
 +
});
 +
$(document).ready(function(){
 +
if($("#nav")) {
 +
$("#nav dd").hide();
 +
$("#nav dt b").click(function() {
 +
if(this.className.indexOf("clicked") != -1) {
 +
$(this).parent().next().slideUp(200);
 +
$(this).removeClass("clicked");
 +
}
 +
else {
 +
$("#nav dt b").removeClass();
 +
$(this).addClass("clicked");
 +
$("#nav dd:visible").slideUp(200);
 +
$(this).parent().next().slideDown(500);
 +
}
 +
return false;
 +
});
 +
}
 +
});
 +
 +
</script>
 +
<!--[if IE]>
 +
<style>
 +
#header {
 +
width: 900px;
 +
}
 +
</style>
 +
<![endif]-->

Revision as of 01:16, 18 June 2011

  • works
It works!