Team:British Columbia/Templates/MainHeader
From 2014.igem.org
(Difference between revisions)
Line 15: | Line 15: | ||
return $.trim($(this).html()) == ''; | return $.trim($(this).html()) == ''; | ||
}).remove() | }).remove() | ||
+ | |||
+ | |||
+ | $(window).scroll(function () { | ||
+ | if ($(this).scrollTop() > 100) { | ||
+ | $('.scrollup').fadeIn(); | ||
+ | } else { | ||
+ | $('.scrollup').fadeOut(); | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | $('.scrollup').click(function () { | ||
+ | $("html, body").animate({ | ||
+ | scrollTop: 0 | ||
+ | }, 600); | ||
+ | return false; | ||
+ | }); | ||
+ | |||
+ | |||
Revision as of 02:54, 18 October 2014