title: Re: jQuery Multiple Checkbox Page Filter
body: <p>This question is an extension of <a href="https://stackoverflow.com/questions/6526029/jquery-multiple-checkbox-page-filter">jQuery Multiple Checkbox Page Filter</a> .  It's my question exactly.</p>
  
  <p>I have three goals:</p>
  
  <ul>
  <li>I want to have a list of check boxes to filter Page Content.</li>
  <li>I want to return only the content that matches all of the currently checked
  boxes, hiding all the rest.</li>
  <li>If no boxes are checked, everything
  should show.</li>
  </ul>
  
  <p>As previously discussed in the above question, goals A and C were accomplished with:</p>
  
  <pre><code>$('div.tags').delegate('input:checkbox', 'change', function()
  {
       var $lis = $('.results &gt; li').hide();
       //For each one checked
       $('input:checked').each(function()
       {
            $lis.filter('.' + $(this).attr('rel')).show();
       });      
  });
  </code></pre>
  
  <p>and goal B was accomplished with:</p>
  
  <pre><code>var selector = $('input:checked').map(function ()
  {
      return $(this).attr('rel');
  }).get().join('.');
  $lis.filter(selector).doWhatever();
  </code></pre>
  
  <p>But I don't know how to integrate these two scripts together?</p>