Authored by xuqi

brand index hover.Review by:@xuqi

... ... @@ -132,10 +132,17 @@ $brandMore.click(function() {
});
//【品牌】索引
$('.brands-index').on('click', 'span', function() {
$('.brands-index').on('mouseenter', 'span', function() {
var $this = $(this),
index = $this.data('index');
if ($this.hasClass('hover')) {
return;
}
$this.siblings('span.hover').removeClass('hover');
$this.addClass('hover');
if ($this.index() === 0) {
//全部
... ...
... ... @@ -170,15 +170,19 @@
float: left;
line-height: 30px;
margin-right: 5px;
cursor: pointer;
span {
margin: 0 3px;
cursor: pointer;
-moz-user-select: none;
&:first-child {
margin-left: 10px;
}
&.hover {
color: #f00;
}
}
}
... ...