...
|
...
|
@@ -4,9 +4,7 @@ var $ = require('yoho-jquery'), |
|
|
var categoryHeight = $('.tab-box').height(),
|
|
|
gender;
|
|
|
|
|
|
var $intercept = $('.no-intercept'),
|
|
|
$list = $('.brand-list-box'),
|
|
|
$listBox = $('.list-box'),
|
|
|
var $listBox = $('.list-box'),
|
|
|
$brandContent = $('.brand-content'),
|
|
|
$tabBox = $('.tab-box'),
|
|
|
$contentIndex = $('.content-index'),
|
...
|
...
|
@@ -28,6 +26,19 @@ function channels(key) { |
|
|
return channel[key];
|
|
|
}
|
|
|
|
|
|
// 点击字母,页面滚动到相关区域
|
|
|
function reference() {
|
|
|
$('.no-intercept').click(function() {
|
|
|
var name = $(this).attr('href').split('#')[1] === '0_9' ? '0~9' : $(this).attr('href').split('#')[1],
|
|
|
targetTop = $('.brand-list-box').find('[name="' + name + '"]').offset().top - categoryHeight;
|
|
|
|
|
|
$('html,body').animate({
|
|
|
scrollTop: targetTop
|
|
|
}, 200);
|
|
|
return false;
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function initialize() {
|
|
|
$('.banner-swiper').each(function() {
|
|
|
if (!$(this).parents('.content').hasClass('hide') && $(this).hasClass('swiper-container-horizontal') === false && $(this).find('li').length > 1) {
|
...
|
...
|
@@ -65,6 +76,8 @@ function loadData(channel) { |
|
|
$tabBox.removeClass('fastening');
|
|
|
$contentIndex.removeClass('distance');
|
|
|
});
|
|
|
|
|
|
reference();
|
|
|
}
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -77,16 +90,7 @@ $brandCha.find('li').click(function() { |
|
|
loadData(channels(gender));
|
|
|
});
|
|
|
|
|
|
// 点击字母,页面滚动到相关区域
|
|
|
$intercept.click(function() {
|
|
|
var name = $(this).attr('href').split('#')[1] === '0_9' ? '0~9' : $(this).attr('href').split('#')[1],
|
|
|
targetTop = $list.find('[name="' + name + '"]').offset().top - categoryHeight;
|
|
|
|
|
|
$('html,body').animate({
|
|
|
scrollTop: targetTop
|
|
|
}, 200);
|
|
|
return false;
|
|
|
});
|
|
|
reference();
|
|
|
|
|
|
$('.brand-tab').find('li').click(function() {
|
|
|
|
...
|
...
|
|