more-list.js 694 Bytes
const $ = require('jquery');
window.jQuery = $;

let moreObj = {
    init: function () {
        this.scroll();
    },
    scroll: function () {
        $(window).scroll(() => {
            if (($(window).scrollTop() + $(window).height() >= $(document).height() * 0.8)) {
                this.getMore();
            }
        });
    },
    getMore: function () {
        $.ajax({
            method: 'GET',
            url: window.$ajaxPath,
            data: {
                page: 2,
                row: 10,
                businessAreaId: 44
            },
            success: function (result) {
            }
        });
    }
};

$(
    function () {
        moreObj.init();
    }
);