你好这里是我的代码,问题是,即使有一个samm数据要追加该网站挂起并需要一些时间来回应我认为这是因为将整个页面附加到一个新的div 这是代码
$(document).ready(function(){
var page = 1;
var height=window.innerHeight;
$(window).scroll(function () {
if($(window).scrollTop() + height >= $("#maindiv").height()) {
document.getElementById('infiscroll').style.display='block';
page++;
var data = {
page_num: page,
serfor: '<?=$searchedfor?>',
ser: '<?=$searched?>'
};
var actual_count = "<?php echo $totalsearchedres; ?>";
if((page-1)* 10 > actual_count){
document.getElementById('infiscroll').style.display='none';
}else{
document.getElementById('infiscroll').style.display='none';
$.ajax({
type: "POST",
url: "friend_searched-scroll.php",
data:data,
success: function(res) {
$("#thebodyy").append(res);
}
});
}
}
});
);
function genuineslide(){
$('#genuineitydiv').slideToggle();
}
任何替代或任何建议请...