Browse Source

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

pull/40/head
czaks 11 years ago
committed by Michael Foster
parent
commit
6bf217941a
  1. 2
      js/expand.js

2
js/expand.js

@ -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 {

Loading…
Cancel
Save