关于我的问题的图片:
当我的Load加载更多帖子然后新的帖子再次获得内容样式时,我试图加载这些帖子而不加载更多并且效果很好。正如你在图片上看到的那样,加载了更多帖子就像那样,如果我加载更多帖子就会变得疯狂
<div id="content">
<div class="inner">
$last_post_id=$_GET['last_post_id'];
$action=$_GET['action'];
if($action <> "get")
{
?>
<!-- Post -->
<script type="text/javascript">
var bSuppressScroll = false;
$(document).ready(function(){
function last_msg_funtion()
{
var ID=$("div.postsize:last").attr("id");
$.post("main.php?leht=latest&action=get&last_post_id="+ID,
function(data){
if (data != "") {
$("div.postsize:last").after(data);
window.bSuppressScroll = false;
}
$('div#last_post_loader').empty();
});
};
$(window).scroll(function(){
if ( ( $(window).scrollTop() == $(document).height() - $(window).height() ) && window.bSuppressScroll == false ){
last_msg_funtion();
window.bSuppressScroll = true;
}
});
});
</script>
<?php
include('include/latest1.php');
echo $list;
}
else
{
include('include/latest.php');
echo $list2;
}
?>
</div>
</div>
和css:
#content {
padding: 3em 5em 8em 5em;
margin-left: 21em;
}