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;
 +
              p += 50;
$('html,body').animate({ scrollTop: p }, 'fast');
$('html,body').animate({ scrollTop: p }, 'fast');
return false;
return false;

Revision as of 19:44, 17 August 2014