$(window).scroll(function(){
var WindowHeight = $(window).height();
if($(window).scrollTop() >= $(document).height() - WindowHeight){
$("-sharploader").html("<img src="../images/loading_v2.svg">");
var LastDiv = $(".data-display:last");
var LastId = $(".data-display:last").attr("id");
var ValueToPass = "lastid="+LastId;
$.ajax({
type: "POST",
url:"/module/user/order/lazyload.app",
data: ValueToPass,
cache: false,
success: function(data){
if(data != ""){
LastDiv.after(data);
}else{
$("-sharploader").html("");
}
}
});
}
return false;
});
what a strange image. I don"t know where I wrote
. As long as the scroll goes to the bottom, I won"t keep asking for it, but obviously I don"t have any data, so I have to go up scroll a little bit before I can see that there are no more .
otherwise, he will keep showing "" loading stories, and then disappear, then show loading symptoms, disappear again, and repeat them all the time