switch js navigation to use wasd

This commit is contained in:
albert
2013-03-09 01:35:34 -05:00
parent 5560d79d5c
commit 3bf617cb57
4 changed files with 41 additions and 26 deletions

View File

@@ -4,9 +4,15 @@
}
Danbooru.scroll_to = function(element) {
var top = null;
if (typeof(element) === "number") {
top = element;
} else {
top = element.offset().top - 10;
}
$('html, body').animate({
scrollTop: element.offset().top - 10
}, 250);
scrollTop: top
}, 0);
}
Danbooru.notice = function(msg) {