display notes only after all are generated

Greatly improves load time of pages with a lot of notes (less DOM changes).
This commit is contained in:
Lightforger
2013-04-19 19:45:24 +03:00
parent 9ec746b952
commit 5327ac7820

View File

@@ -441,7 +441,8 @@ Danbooru.Note = {
left: x,
top: y,
width: w,
height: h
height: h,
display: 'none'
});
$("#note-container").append($note_box);
@@ -488,6 +489,12 @@ Danbooru.Note = {
$article.html()
);
});
$('#note-container').css('display','none');
$('.note-box').each(function(i, v) {
$(v).css('display','block')
});
$('#note-container').css('display','block');
}
}