私はこれまでこの条件を試してきました。
'if ($(window).scrollTop() == $(document).height() - $(window).height())'
誰でも私が解決策を得るのを手伝ってくれますか.???
私はこれまでこの条件を試してきました。
'if ($(window).scrollTop() == $(document).height() - $(window).height())'
誰でも私が解決策を得るのを手伝ってくれますか.???
$(window).on('scroll', function() {
if (($(this).scrollTop() + $(this).height()) - $(document).outerHeight(true) > (-200)) {...}
});
これを試して:
$(function () {
$(window).on('scroll', function () {
if ($(window).scrollTop() + $(window).height() >= $(document).height() - 200) {
//initate ajax here
}
});
});