caoyuanye %!s(int64=5) %!d(string=hai) anos
pai
achega
dcffabdb3c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      维修品牌.js

+ 1 - 1
维修品牌.js

@@ -1,6 +1,6 @@
 $(document).ready(function () {
   $('.brand-select-item-children-item:not("#allBrand")').on('click',function (e) {
-    if($('.brand-select-item-children-item.selected:not("#allBrand")').length>=15){
+    if((!$(e.target).hasClass('selected'))&&$('.brand-select-item-children-item.selected:not("#allBrand")').length>=15){
       alert('最大只能选择15条')
     }else{
       $(e.target).toggleClass('selected')