Authored by Lynnic

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

... ... @@ -45,7 +45,7 @@ $fixTitleBar.css({
minBrandListTop = brandSwipe + $('.hot-brand').outerHeight() + $('.banner-top').outerHeight();
$brandList.last().append($fixTitleBar);
$(window).scroll(function() {
function scrollHandler() {
var scrTop = $(window).scrollTop();
if ($brandList.eq(0).offset().top < minBrandListTop) {
... ... @@ -62,8 +62,14 @@ $(window).scroll(function() {
}
});
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
function changeBackground() {
var $brandList = $('.brand-list').find('p');
... ...
... ... @@ -107,12 +107,17 @@ $nav.on('touchend touchcancel', function(e) {
}
});
$(document).scroll(function() {
function scrollHandler() {
var $c = $infos.not('.hide');
if ($(window).scrollTop() + winH >= $(document).height() - 0.25 * $c.height()) {
loadMore($c, state[curType]);
}
}
//srcoll to load more
$(document).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
$nav.on('touchstart', function(e) {
... ...
... ... @@ -40,8 +40,13 @@ if ($tag.length > 0) {
});
}
$(document).scroll(function() {
function scrollHandler() {
if ($(window).scrollTop() + winH >= $(document).height() - 0.25 * $infos.height()) {
loadMore($infos, setting);
}
});
\ No newline at end of file
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
... ...
... ... @@ -133,13 +133,17 @@ function search() {
});
}
$('.maybe-like p').on('touchstart', function (e) {
$('.maybe-like p').on('touchstart', function(e) {
search();
});
//srcoll to load more
$(window).scroll(function () {
function scrollHandler() {
if ($(window).scrollTop() + winH >= $(document).height() - 50) {
search();
}
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
\ No newline at end of file
... ...
... ... @@ -206,14 +206,11 @@ favContentHammer.on('tap', function(e) {
});
});
// 上拉加载更多
$(document).scroll(function() {
function scrollHandler() {
if ($(window).scrollTop() + winH >= $(document).height() - footerH) {
if (brandTab) {
console.log(1);
$brandLoadMore.filter('.hide').removeClass('hide');
if (!brandLockId) {
... ... @@ -231,4 +228,9 @@ $(document).scroll(function() {
}
}
}
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
\ No newline at end of file
... ...
... ... @@ -18,13 +18,21 @@ var setting = {
end: false
};
function scrollHandler() {
if ($(window).scrollTop() + winH >= $(document).height() - 0.25 * $infoList.height()) {
loadMore($infoList, setting, '/home/myguang');
}
}
//对于有逛收藏的页面进行事件处理
if ($infoList.length > 0) {
info.initInfosEvt($infoList);
//srcoll to load more
$(window).scroll(function() {
if ($(window).scrollTop() + winH >= $(document).height() - 0.25 * $infoList.height()) {
loadMore($infoList, setting, '/home/myguang');
}
window.requestAnimationFrame(scrollHandler);
});
}
\ No newline at end of file
}
... ...
... ... @@ -167,7 +167,7 @@ orderHammer.on('tap', function(e) {
}
});
$(window).scroll(function() {
function scrollHandler() {
if (order.end === false && $(window).scrollTop() + winH >
$(document).height() - 0.25 * $orderContainer.height()) {
... ... @@ -176,6 +176,11 @@ $(window).scroll(function() {
noLoadingMask: true
});
}
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
//初始化请求第一页数据
... ...
... ... @@ -99,5 +99,4 @@ function scrollHandler() {
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
});
\ No newline at end of file
... ...
... ... @@ -362,13 +362,18 @@ $listNav.on('touchend touchcancel', function(e) {
}
});
$(window).scroll(function() {
function scrollHandler() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if ($(window).scrollTop() + winH >
$(document).height() - 0.25 * $goodsContainer.height()) {
search();
}
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
if ($brandHeader.length > 0) {
... ...
... ... @@ -347,11 +347,10 @@ $listNav.on('touchend touchcancel', function(e) {
search();
}
}
e.stopPropagation();
});
$(window).scroll(function() {
function scrollHandler() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if ($(window).scrollTop() + winH >
... ... @@ -360,6 +359,11 @@ $(window).scroll(function() {
search();
}
}
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
//初始请求最新第一页数据
... ...
... ... @@ -53,7 +53,7 @@ function hotrank(page, sort, tabId, notab) {
});
}
$(window).scroll(function () {
function scrollHandler() {
if (page === 2) {
return;
}
... ... @@ -63,11 +63,16 @@ $(window).scroll(function () {
page = 2;
notab = 1;
hotrank(page, sort, id, notab);
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
hotrank(page, sort, id, notab);
hotnav = new Hammer(document.getElementById('hotRank'));
hotnav.on('tap', function (e) {
hotnav.on('tap', function(e) {
var ev = ev || window.event;
var target = ev.target || ev.srcElement;
... ...
... ... @@ -359,7 +359,7 @@ $listNav.on('touchend touchcancel', function(e) {
e.stopPropagation();
});
$(window).scroll(function() {
function scrollHandler() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if ($(window).scrollTop() + winH >
... ... @@ -368,6 +368,11 @@ $(window).scroll(function() {
search();
}
}
}
//srcoll to load more
$(window).scroll(function() {
window.requestAnimationFrame(scrollHandler);
});
//初始请求最新第一页数据
... ...