Team:Uppsala/JavaScript

From 2014.igem.org

Revision as of 10:13, 16 July 2014 by Tjocko (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<script type="text/javascript">

$(document).ready(function (){ var stats = $('.back-to-top'),

   timer;

stats.hide();

$(function () { $(window).scroll(function() { stats.fadeIn(); clearTimeout(timer); timer = setTimeout(function() { stats.stop(true,true).fadeOut('slow'); }, 3000);

}); $('.back-to-top').click(function () { $('body,html').animate({ scrollTop: 0 }, 800); return false; }); }); });

</script>