title: I have a search and checkbox filter that should be filtering together, but my checkbox filter code isn't working
body: <p>For some reason, my checkbox filter isn't working but my search filter is. What's wrong with it? Here is my search + checkbox filter below:</p>
  
  <pre><code>// search filter (working)
  
  $(document).ready(function() {
    $("#myInput").keyup(function() {
  
      // Retrieve the input field text and reset the count to zero
      var filter = $(this).val(),
        count = 0;
  
      // Loop through the comment list
      $("tr").each(function() {
  
        // If the list item does not contain the text phrase fade it out
        if ($(this).text().search(new RegExp(filter, "i")) &lt; 0) {
          $(this).fadeOut(0).addClass('hidden');
  
          // Show the list item if the phrase matches and increase the count by 1
        } else {
          $(this).show().removeClass('hidden');
          count++;
        }
      });
  
      // Update the count
      var numberItems = count;
      $("#filter-count").text("Number of Rows = " + count);
    });
  });
  
  
  // checkbox filter (not working)
  
  $(document).ready(function() {
    $('#myTable tr' + $(this).attr('rel')).show();
  
    $('div.modal-body').find('input:checkbox').live('click', function() {
  
      if ($('div.modal-body').find('input:checkbox:checked').length &gt; 0) {
        $('#myTable tr').hide();
        $('div.modal-body').find('input:checked').each(function() {
          $('#myTable tr' + $(this).attr('rel')).not('.hidden').show();
        });
      } else {
        $('#myTable tr').not('.hidden').show();
      }
    });
  });
  </code></pre>