Authored by ccbikai

品牌一览背景色

... ... @@ -43,7 +43,7 @@ $fixTitleBar.css({
top: brandSwipe
}).hide();
minBrandListTop = brandSwipe + $('.hot-brand').outerHeight() + $('.banner-top').outerHeight();
$('.brand-list').last().append($fixTitleBar);
$brandList.last().append($fixTitleBar);
$(window).scroll(function() {
var scrTop = $(window).scrollTop();
... ... @@ -64,6 +64,19 @@ $(window).scroll(function() {
});
});
function changeBackground() {
var $brandList = $('.brand-list').find('p');
$brandList.on('touchstart', function() {
$brandList.css('background', '#fff');
$(this).css('background', '#eee');
}).on('touchend touchcancel', function() {
$(this).css('background', '#fff');
});
}
changeBackground();
function searchResult() {
var keyword = ($keyword.val() + '').toLowerCase();
var result = {},
... ... @@ -113,6 +126,7 @@ function searchResult() {
// 插入 dom,绑定事件
$('.search-result').html(html);
changeBackground();
}
if ($('.brand-search-page').length) {
... ...