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;
+
var p = $(".scroll").eq(i).offset().top;
-
              p -= 100;
+
              p -= 50;
$('html,body').animate({ scrollTop: p }, 500, 'swing');
$('html,body').animate({ scrollTop: p }, 500, 'swing');
return false;
return false;

Revision as of 08:53, 1 September 2014