Authored by 王水玲

sale 断码区bug修改

<div class="installment-page installment-bg">
<div class="installment-page installment-bg yoho-page">
{{#if notOpen}}
<input type="hidden" value="false" class="is-open">
{{# bannerTop}}
... ...
... ... @@ -112,6 +112,10 @@ function subClassifyTapEvt($this) {
});
}
if (hCbFn) {
hCbFn();
}
hideFilter();
}
... ... @@ -164,14 +168,13 @@ function initFilter(opt) {
});
if (opt.isScroll) {
$('ul.sub-classify').each(function() {
var lastY = 0, y = 0;
var $slider = $(this);
$(this).wrap('<div class=\'sub-classify-farther\' data-type=\'' + $(this).data('type') + '\'></div>');
// $(this).removeClass("sub-classify");
var lastY = 0, y = 0;
var $slider = $(this);
$slider.on('touchstart', function(e) {
lastY = e.originalEvent.touches[0].pageY;
});
... ... @@ -180,21 +183,26 @@ function initFilter(opt) {
var deltaY = curY - lastY;
var height = $(this)[0].scrollHeight;
var limit = height - $(this).parent().height();
var translate;
y = y + deltaY;
if (y < limit * -1)
if (y < limit * -1) {
y = limit * -1;
if (y > 0)
}
if (y > 0) {
y = 0;
var translate = 'translate3d(0,' + y + 'px,0)';
}
translate = 'translate3d(0,' + y + 'px,0)';
$(this).css({
'-moz-transform': translate,
'-ms-transform': translate,
'transform': translate,
'-webkit-transform': translate,
'-webkit-transform': translate
});
lastY = curY;
});
$slider.on('touchend', function(e) {});
$slider.on('touchend', function() {});
});
}
... ...