Team:DTU-Denmark/sysucolortest

From 2014.igem.org

(Difference between revisions)
Line 80: Line 80:
</style>
</style>
 +
 +
<script type="text/javascript">
 +
$(document).ready(function(){
 +
 +
// hide #back-top first
 +
$("#back-top").hide();
 +
 +
// fade in #back-top
 +
$(function () {
 +
$(window).scroll(function () {
 +
if ($(this).scrollTop() > 100) {
 +
$('#back-top').fadeIn();
 +
} else {
 +
$('#back-top').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>
 +
 +
<!--Header-->
<!--Header-->
Line 144: Line 175:
</div>
</div>
-
 
+
<p id="back-top">
 +
<a href="#top"><span></span></a>
 +
</p>
</body>
</body>
</html>
</html>

Revision as of 10:56, 1 August 2014

MOVED to template_css