$(window).scroll(function(){
var scrollTop = $(window).scrollTop();
var innerHeight = $(window).innerHeight();
var scrollHeight = $('body').prop('scrollHeight');
var cardCnt = $('.card').length;
if ($('#projectListArea').is(':visible') && (Math.ceil(scrollTop + innerHeight) >= (scrollHeight - 100)) && !oneTime) {
if(cardCnt === totalCnt) {
return false;
}
page += 1;
oneTime = true;
getFreeList();
}
});
$(document).ready(function(){
//.......
});
밖으로 빼라