...
|
...
|
@@ -25,20 +25,24 @@ $('.yoho-header').css({ |
|
|
});
|
|
|
$('.banner-top').css('padding-top', '90px');
|
|
|
|
|
|
|
|
|
if($brandList.length > 0){
|
|
|
$(window).scroll(function(){
|
|
|
if ($brandList.length > 0) {
|
|
|
$(window).scroll(function() {
|
|
|
var scrTop = $(window).scrollTop(),
|
|
|
searchH = $('.newbrand-search').height(),
|
|
|
headerH = $('.yoho-header').height(),
|
|
|
brandSwipe = parseInt(searchH) + parseInt(headerH);
|
|
|
$('.brand-list').each(function(){
|
|
|
|
|
|
$('.brand-list').each(function() {
|
|
|
var offTop = $(this).offset().top - brandSwipe;
|
|
|
if(scrTop >= offTop){
|
|
|
$brandList.find('.title-bar').css('position','static');
|
|
|
$(this).find('.title-bar').css({'position':'fixed', 'top':brandSwipe});
|
|
|
}else{
|
|
|
$(this).find('.title-bar').css('position','static');
|
|
|
|
|
|
if (scrTop >= offTop) {
|
|
|
$brandList.find('.title-bar').css('position', 'static');
|
|
|
$(this).find('.title-bar').css({
|
|
|
position: 'fixed',
|
|
|
top: brandSwipe
|
|
|
});
|
|
|
} else {
|
|
|
$(this).find('.title-bar').css('position', 'static');
|
|
|
}
|
|
|
});
|
|
|
});
|
...
|
...
|
|