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

$('div.post.reply:last') is too specific; use $('div.post:last') or else it won't include the OP

This commit is contained in:
Michael Save 2012-03-16 09:08:03 +11:00
parent 53f4bf6136
commit f48d338ce0

View File

@ -26,7 +26,7 @@ $(document).ready(function(){
$(data).find('div.post.reply').each(function() { $(data).find('div.post.reply').each(function() {
var id = $(this).attr('id'); var id = $(this).attr('id');
if($('#' + id).length == 0) { if($('#' + id).length == 0) {
$(this).insertAfter($('div.reply:last').next()).after('<br class="clear">'); $(this).insertAfter($('div.post:last').next()).after('<br class="clear">');
} }
}); });
} }
@ -36,7 +36,7 @@ $(document).ready(function(){
}; };
$(window).scroll(function() { $(window).scroll(function() {
if($(this).scrollTop() + $(this).height() < $('div.post.reply:last').position().top + $('div.post.reply:last').height()) { if($(this).scrollTop() + $(this).height() < $('div.post:last').position().top + $('div.post:last').height()) {
clearTimeout(poll_interval); clearTimeout(poll_interval);
poll_interval = false; poll_interval = false;
return; return;