...
|
...
|
@@ -30,26 +30,15 @@ function hotrank(page, sort, tabId, notab) { |
|
|
lazyLoad($('img.lazy'));
|
|
|
$('#yoho-footer').css('position', 'static');
|
|
|
$('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
|
|
|
winH = $(window).height();
|
|
|
if ($('.rank-main').length !== 0) {
|
|
|
listTop = $('.rank-main').find('ul').offset().top;
|
|
|
}
|
|
|
navSwiper = new Swiper('.s-goods-nav', {
|
|
|
grabCursor: true,
|
|
|
slidesPerView: 'auto',
|
|
|
slideElement: 'li'
|
|
|
});
|
|
|
|
|
|
winH = $(window).height();
|
|
|
listTop = $('.rank-main').find('ul').offset().top;
|
|
|
$('.s-goods-nav .nav-item').each(function(index) {
|
|
|
hotnav = new Hammer($('.s-goods-nav .nav-item')[index]);
|
|
|
hotnav.on('tap', function(e) {
|
|
|
var navItme = $('.s-goods-nav .nav-item').eq(index);
|
|
|
|
|
|
id = navItme.data('id') ? navItme.data('id') : '';
|
|
|
sort = navItme.data('sort') ? navItme.data('sort') : '';
|
|
|
page = 1;
|
|
|
notab = 1;
|
|
|
hotrank(page, sort, id, notab);
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -67,3 +56,18 @@ $(window).scroll(function () { |
|
|
|
|
|
});
|
|
|
hotrank(page, sort, id, notab);
|
|
|
hotnav = new Hammer(document.getElementById('hotRank'));
|
|
|
hotnav.on('tap', function (e) {
|
|
|
var ev = ev || window.event;
|
|
|
var target = ev.target || ev.srcElement;
|
|
|
|
|
|
if (target.nodeName.toLowerCase() === 'span') {
|
|
|
$('.s-goods-nav .nav-item').removeClass('active');
|
|
|
target.parentNode.className = 'active ' + target.parentNode.className;
|
|
|
id = target.getAttribute('data-id') ? target.getAttribute('data-id') : '';
|
|
|
sort = target.getAttribute('data-sort') ? target.getAttribute('data-sort') : '';
|
|
|
page = 1;
|
|
|
notab = 1;
|
|
|
hotrank(page, sort, id, notab);
|
|
|
}
|
|
|
}) |
...
|
...
|
|