こんにちは、ajax スクロール ページネーションを使用しています。ページを高速で 2 回スクロールするとチェックされ、2 回同じ ID を 2 回送信すると結果が有効になり、この問題を解決するにはどうすればよいですか? ここに私のスクリプト
$(document).ready(function(){
function last_msg_funtion()
{
var IDall=$(".box-mainb:last").attr("id");
var cbid=$(".box-mainp:last").attr("id");
$('div#last_msg_loaderi').html('<img src="bigLoader.gif">');
$.get('page.php', {'action':'get','last_msg_id':IDall,'id':cbid},
function(dataz){
if (dataz != "") {
$(".box-mainb:last").after(dataz);
}
$('div#last_msg_loaderi').empty();
});
};
$(window).scroll(function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()){
last_msg_funtion();
}
});
});