Template:Team:NCTU Formosa/header-project

From 2012.igem.org

(Difference between revisions)
Line 497: Line 497:
</style>
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
-
<script>
 
-
$(document).ready(function(){
 
-
// hide #back-top first
 
-
$("#back-top").hide();
 
-
$("#submenu").hide();
 
-
// fade in #back-top
 
-
$(function () {
 
-
$(window).scroll(function () {
 
-
if ($(this).scrollTop() > 130) {
 
-
$('#back-top').fadeIn();
 
-
$('#submenu').fadeIn();
 
-
} else {
 
-
$('#back-top').fadeOut();
 
-
$('#submenu').fadeOut();
 
-
}
 
-
});
 
-
// scroll body to 0px on click
 
-
$('#back-top a').click(function () {
 
-
$('body,html').animate({
 
-
scrollTop: 0
 
-
}, 800);
 
-
return false;
 
-
});
 
-
});
 
-
});
 
-
</script>
 
</head>
</head>
<body>
<body>

Revision as of 15:28, 26 October 2012