var b = 0;
t = 0;
i = 1;
isbool=true;
wwidth=$(window).width();
$(window).scroll(function(){
t = $(this).scrollTop();
if(b < t){
var scrollPos = $(window).scrollTop();
if(wwidth<750){
winPos=($(document).height())/2-100;
}else{
winPos=($(document).height()-900);
}
if(scrollPos > winPos && isbool==true ) {
isbool=false;
$.ajax({
url : '/e/action/ajaxmore.php',
type:'POST',
data:{
"next":i,
'table':'news',
'action':'getmorenews',
'limit':20,
'classid':classid,
'small_length':120,
'pagetype':'news'
},
dataType : 'html',
beforeSend:function(){
$(".loading").show();
},
success : function(data){
$(".loading").hide();
isbool=true;
if(data){
$(".content").append(data);
i++;
}else{
$(".loading-end").show();
return false;
}
}
});
}
}else{
console.log('向上滚动中...')
}
setTimeout(function(){
b = t
}, 0)
});