Template:Team:KIT-Kyoto/Scroll

From 2014.igem.org

(Difference between revisions)
Line 4: Line 4:
$(".btn").click(function () {
$(".btn").click(function () {
var i = $(".btn").index(this)
var i = $(".btn").index(this)
-
var p = $(".sentence").eq(i).offset().top(+60px);
+
var p = $(".sentence").eq(i).offset().top+60px;
$('html,body').animate({ scrollTop: p }, 'fast');
$('html,body').animate({ scrollTop: p }, 'fast');
return false;
return false;

Revision as of 19:40, 17 August 2014