Checkboxes + Jquery hide/show

后端 未结 3 1496
甜味超标
甜味超标 2021-01-20 16:18

I have a series of a series of rows and checkboxes to filter them:

  • &l
3条回答
  •  Happy的楠姐
    2021-01-20 16:55

      $("table tr").hide();
      $("input[id^='type-']").each(function() {
        element = $(this);
        $("table tr").each(function() {
          if($(this).hasClass(element.id.replace('type-','')) {
            if(element.is(":checked") {
              element.show();
            }
          }
        });
      }).change(); 
    

提交回复
热议问题