mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-12 16:27:37 +00:00
12 lines
404 B
JavaScript
12 lines
404 B
JavaScript
$(function() {
|
|
var hash = document.location.hash.substring(1);
|
|
$('html, body').animate({ scrollTop: $("#" + hash + "-fake").offset().top - 100 }, 1000);
|
|
});
|
|
|
|
$(".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);
|
|
}); |