[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/master] Fix scroll-to-top button.
commit 0c8a2f649333edf52c9075745e862d65751994d8
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu Jan 5 13:43:58 2017 +0100
Fix scroll-to-top button.
---
website/web/js/script.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/website/web/js/script.js b/website/web/js/script.js
index 10a918a..5efcf10 100644
--- a/website/web/js/script.js
+++ b/website/web/js/script.js
@@ -25,9 +25,7 @@ jQuery(function() {
var target = this.hash;
var $target = $(target.split('#').join('#anchor-'));
if ($target.offset() != null) {
- $('html, body').stop().animate({
- 'scrollTop': ($target.offset().top + $(document).scrollTop())
- }, 900, 'swing', function () {
+ jQuery('html,body').animate({scrollTop: $target.offset().top},900, function(){
window.location.hash = target;
});
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits