私はこの機能を持っています
function () {
if ($(window).scrollTop() >= ($(document).height() - $(window).height()) * 0.7) {
//$(window).unbind('scroll');
jQuery.get('moreProfileComments', function (e, success) {
$(window).scroll(scrollEvent);
console.log(e);
var result_div = $(e).find('#user_comments #u_cont div');
var original_div = $('#user_comments #u_cont div');
if (result_div.last().html() === original_div.last().html()) {
//alert("TEST");
//$(window).unbind('scroll');
} else {
//$(rs).appendTo('#search_results').fadeIn('slow');
$('#user_comments #u_cont').append($(e).find('#user_comments #u_cont').html());
$(window).scroll(scrollEvent);
}
}, "html");
}
};
それはajaxリクエストを作成しますが、1つのajaxリクエストのみを起動するようにするにはどうすればよいですか?リクエストがすでに送信されているか送信されている場合。複数のajaxリクエストは必要ありません。