add js for scrolling to error/notice

This commit is contained in:
albert
2013-03-02 19:15:53 -05:00
parent e28c786fa1
commit 5ece9fe99a

View File

@@ -5,10 +5,18 @@
Danbooru.notice = function(msg) {
$('#notice').html(msg).addClass("ui-state-highlight").removeClass("ui-state-error").fadeIn("fast");
var scroll_top = $("#notice");
$('html, body').animate({
scrollTop: scroll_top
}, 250);
}
Danbooru.error = function(msg) {
$('#notice').html(msg).removeClass("ui-state-highlight").addClass("ui-state-error").fadeIn("fast");
var scroll_top = $("#notice");
$('html, body').animate({
scrollTop: scroll_top
}, 250);
}
Danbooru.is_subset = function(array, subarray) {