Difference between revisions of "Template:Aachen/footer"

Line 1: Line 1:
 
<html>
 
<html>
 
     <body>
 
     <body>
 +
        $(document).ready(function () {
 +
 +
    $(window).scroll(function () {
 +
        if ($(this).scrollTop() > 100) {
 +
            $('.scrollup').fadeIn();
 +
        } else {
 +
            $('.scrollup').fadeOut();
 +
        }
 +
    });
 +
 +
    $('.scrollup').click(function () {
 +
        $("html, body").animate({
 +
            scrollTop: 0
 +
        }, 600);
 +
        return false;
 +
    });
 +
 +
});
 
         <script type="text/javascript" src="https://2017.igem.org/Template:Aachen/Javascript?
 
         <script type="text/javascript" src="https://2017.igem.org/Template:Aachen/Javascript?
 
action=raw&ctype=text/javascript"></script>
 
action=raw&ctype=text/javascript"></script>
 
     </body>
 
     </body>
 
</html>
 
</html>

Revision as of 19:00, 1 November 2017

$(document).ready(function () { $(window).scroll(function () { if ($(this).scrollTop() > 100) { $('.scrollup').fadeIn(); } else { $('.scrollup').fadeOut(); } }); $('.scrollup').click(function () { $("html, body").animate({ scrollTop: 0 }, 600); return false; }); });