title: Remove class for elements within a group for Isotope filtering
body: <p>I'm attempting to remove the class 'is-checked' from all buttons in a group when a user clicks on the 'all' button. There are two groups of filter buttons I'm working with: categories and tags.</p>
  
  <p>I've been able to create a function that removes the class 'is-checked' from all buttons across both groups, but I've not yet been able to isolate the function to each group, although I'm very close.</p>
  
  <p>The final function will add the class 'is-checked' to the 'all' button and remove the class from any other buttons within that specific group. The function works, except for the problematic line below:</p>
  
  <pre><code>    $buttonGroup.find('.is-checked').removeClass('is-checked');
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>// class toggling for all buttons by group
      $('.button-group').each( function( i, buttonGroup ) {
          var $buttonGroup = $( buttonGroup );
          var $this = $(this);
          $buttonGroup.on( 'click', 'button', function() {
              if ( $this.hasClass('all') ) {
                  $buttonGroup.find('.is-checked').removeClass('is-checked');
                  $this.addClass('is-checked');
              }
              else {
                  $buttonGroup.find('.all').removeClass('is-checked');
              }
          });
      });
  </code></pre>
  
  <p>As the title mentions, this is for use within the Isotope framework for a portfolio with combination filtering (hence the two distinct groups of filters).</p>
  
  <p>Any ideas where I'm going wrong?</p>