my-guang.js 483 Bytes
/**
 * 我的逛
 * @author xuqi<qi.xu@yoho.cn>
 * @date: 2015/11/17
 */

var $ = require('jquery');

var $infoList = $('#info-list');

var winH = $(window).height();

var info = require('../guang/info'),
    loadMore = info.loadMore;

var setting = {
    page: 2,
    end: false
};

info.initInfoEvt($infoList);

$(window).scroll(function() {
    if ($(window).scrollTop() + winH >= $(document).height() - 0.25 * $infoList.height()) {
        loadMore($infoList, setting);
    }
});