Authored by xuqi

filter sort active status

@@ -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');
@@ -73,6 +73,10 @@ @@ -73,6 +73,10 @@
73 } 73 }
74 } 74 }
75 75
  76 + .sort-pre .active .attr {
  77 + border: 1px solid #000;
  78 + }
  79 +
76 .sort-sub-wrap { 80 .sort-sub-wrap {
77 width: 100%; 81 width: 100%;
78 82