Files
Botania/web/scroll.js
T
2014-04-16 19:07:45 +01:00

7 lines
241 B
JavaScript

$(".hashlink").click(function() {
var hash = $(this).text();
if(hash == 'Back to top')
$('html, body').animate({ scrollTop: 0 }, 500);
else $('html, body').animate({ scrollTop: $("#" + hash + "-fake").offset().top - 100 }, 1000);
});