From ec143c7132d0ec7dd2e9aeb4ba241bca25b19f95 Mon Sep 17 00:00:00 2001 From: shrkey Date: Wed, 19 Oct 2016 00:48:13 +0100 Subject: [PATCH] scroll --- escape.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/escape.html b/escape.html index fa07c49..6255b93 100644 --- a/escape.html +++ b/escape.html @@ -37,7 +37,9 @@ var hash = window.location.hash; if(hash != '') { - location.href = hash; + $('html, body').animate({ + scrollTop: $(hash).offset().top + }, 2000); console.log(hash); }