Difference between revisions of "Team:Cambridge-JIC"
Line 36: | Line 36: | ||
$(this).on("click", function(){ | $(this).on("click", function(){ | ||
console.log($(this).parents("section").next().offset().top) | console.log($(this).parents("section").next().offset().top) | ||
− | $("html, body").animate({ scrollTop: $(this).parents("section").next().offset().top- | + | $("html, body").animate({ scrollTop: $(this).parents("section").next().offset().top-100 }, 1000); |
}) | }) | ||
$(this).css("cursor", "pointer") | $(this).css("cursor", "pointer") |
Revision as of 16:11, 4 August 2015