filter sort active status
Showing
2 changed files
with
9 additions
and
1 deletions
@@ -91,7 +91,11 @@ $('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | @@ -91,7 +91,11 @@ $('.filter-box').on('selectstart', '.attr, .brands-index span', function() { | ||
91 | 91 | ||
92 | //【分类】 | 92 | //【分类】 |
93 | $('.sort-pre').on('click', 'li', function() { | 93 | $('.sort-pre').on('click', 'li', function() { |
94 | - var index = $(this).index(); | 94 | + var $this = $(this), |
95 | + index = $this.index(); | ||
96 | + | ||
97 | + $this.siblings('.active').removeClass('active'); | ||
98 | + $this.addClass('active'); | ||
95 | 99 | ||
96 | $sortSub.children(':not(.hide)').addClass('hide'); | 100 | $sortSub.children(':not(.hide)').addClass('hide'); |
97 | $sortSub.children(':eq(' + index + ')').removeClass('hide'); | 101 | $sortSub.children(':eq(' + index + ')').removeClass('hide'); |
-
Please register or login to post a comment