fixes #738
This commit is contained in:
@@ -50,7 +50,9 @@
|
||||
Danbooru.Comment.initialize_response_link = function() {
|
||||
$("a.expand-comment-response").click(function(e) {
|
||||
$(e.target).hide();
|
||||
$(e.target).closest("div.new-comment").find("form").slideDown("fast");
|
||||
var $form = $(e.target).closest("div.new-comment").find("form");
|
||||
$form.slideDown("fast");
|
||||
Danbooru.scroll_to($form);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
@@ -2,18 +2,20 @@
|
||||
Danbooru.meta = function(key) {
|
||||
return $("meta[name=" + key + "]").attr("content");
|
||||
}
|
||||
|
||||
Danbooru.scroll_to = function(element) {
|
||||
$('html, body').animate({
|
||||
scrollTop: element.offset().top - 10
|
||||
}, 250);
|
||||
}
|
||||
|
||||
Danbooru.notice = function(msg) {
|
||||
$('#notice').html(msg).addClass("ui-state-highlight").removeClass("ui-state-error").fadeIn("fast");
|
||||
var scroll_top = $("#notice");
|
||||
}
|
||||
|
||||
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.scroll_to($("#notice"));
|
||||
}
|
||||
|
||||
Danbooru.is_subset = function(array, subarray) {
|
||||
|
||||
Reference in New Issue
Block a user