1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 07:30:10 +01:00

expand.js: fix a weird bug - thread expand not always worked due to post being loaded in DOM, but not put in a right place in a thread, or so, so check if it has been loaded in a thread instead of if it exists in DOM

This commit is contained in:
czaks 2013-07-26 22:34:06 -04:00
parent 1a43b87315
commit a28b5fc3a1

View File

@ -27,7 +27,7 @@ $(document).ready(function(){
success: function(data) {
var last_expanded = false;
$(data).find('div.post.reply').each(function() {
if($('#' + $(this).attr('id')).length == 0) {
if(thread.find('#' + $(this).attr('id')).length == 0) {
if(last_expanded) {
$(this).addClass('expanded').insertAfter(last_expanded).before('<br class="expanded">');
} else {