Team:Uppsala/JavaScript

From 2014.igem.org

(Difference between revisions)
Tjocko (Talk | contribs)
(Created page with "<script type="text/javascript"> $(document).ready(function (){ var stats = $('.back-to-top'), timer; stats.hide(); $(function () { $(window).scroll(function() { s...")
Newer edit →

Revision as of 10:13, 16 July 2014

<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>