title: Jquery Remove elements including parent element
body: <p>I want to remove elements from my page. I want to remove all .Panel elements which do not also have the .SelectedPanel class. </p>
  
  <pre><code>$('.Panel :not(.SelectedPanel)').remove();
  </code></pre>
  
  <p>I have tried the above, which works, but leaves the parent col divs - I want to remove these as well. So with the markup below, I want the middle column to be removed.</p>
  
  <pre><code>&lt;div class='row'&gt;                
      &lt;div class='col-xs-6 col-sm-1'&gt;
          &lt;div class='Panel SelectedPanel'&gt;
              ....
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class='col-xs-6 col-sm-1'&gt;
          &lt;div class='Panel'&gt;
              ....
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class='col-xs-6 col-sm-1'&gt;
          &lt;div class='Panel SelectedPanel'&gt;
              ....
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>