...
|
...
|
@@ -18,6 +18,7 @@ var swiper, |
|
|
var searchH = $('.newbrand-search').outerHeight(),
|
|
|
headerH = $('.yoho-header').outerHeight(),
|
|
|
brandSwipe = parseInt(searchH) + parseInt(headerH) - 1,
|
|
|
minBrandListTop,
|
|
|
searchArray = [];
|
|
|
|
|
|
var brandsData,
|
...
|
...
|
@@ -42,13 +43,15 @@ $('.yoho-header').css({ |
|
|
});
|
|
|
|
|
|
$fixTitleBar = $('<div class="title-bar fixed-title-bar"><h2></h2></div>');
|
|
|
$fixTitleBar.hide();
|
|
|
$fixTitleBar.css({
|
|
|
position: 'fixed',
|
|
|
top: brandSwipe
|
|
|
}).hide();
|
|
|
minBrandListTop = brandSwipe + $('.hot-brand').outerHeight() + $('.banner-top').outerHeight();
|
|
|
$('.brand-list').last().append($fixTitleBar);
|
|
|
|
|
|
$(window).scroll(function() {
|
|
|
var scrTop = $(window).scrollTop(),
|
|
|
minBrandListTop = brandSwipe + $('.hot-brand').outerHeight() +
|
|
|
$('.banner-top').outerHeight();
|
|
|
var scrTop = $(window).scrollTop();
|
|
|
|
|
|
if ($brandList.eq(0).offset().top < minBrandListTop) {
|
|
|
$fixTitleBar.hide();
|
...
|
...
|
@@ -59,9 +62,7 @@ $(window).scroll(function() { |
|
|
|
|
|
if (scrTop >= offTop) {
|
|
|
$fixTitleBar.css({
|
|
|
display: 'block',
|
|
|
position: 'fixed',
|
|
|
top: brandSwipe
|
|
|
display: 'block'
|
|
|
}).find('h2').html($(this).find('.title-bar').text());
|
|
|
}
|
|
|
|
...
|
...
|
|