Template:Team:KIT-Kyoto/Scroll
From 2014.igem.org
(Difference between revisions)
(2 intermediate revisions not shown) | |||
Line 6: | Line 6: | ||
var p = $(".scroll").eq(i).offset().top; | var p = $(".scroll").eq(i).offset().top; | ||
p -= 70; | p -= 70; | ||
- | $('html,body').animate({ scrollTop: p }, | + | $('html,body').animate({ scrollTop: p }, 500, 'swing'); |
return false; | return false; | ||
}); | }); | ||
Line 16: | Line 16: | ||
}); | }); | ||
top.click(function () { | top.click(function () { | ||
- | $('body,html').animate({scrollTop: 0 }, | + | $('body,html').animate({scrollTop: 0 }, 500, 'swing'); |
return false; | return false; | ||
}); | }); |
Latest revision as of 08:38, 15 September 2014