my-guang.js 603 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
};

//对于有逛收藏的页面进行事件处理
if ($infoList.length > 0) {
    info.initInfosEvt($infoList);

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