title: hide div if it doesn't have a certain class
body: <p>I need to hide a class if it doesn't have the class <code>active</code>.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    
    if (!$('.active').hasClass('active')) {
      $(this).hide();
    };
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;div class="subheader active"&gt;
    &lt;p&gt;Hello&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class="subheader"&gt;
    &lt;p&gt;Goodbye&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class="subheader"&gt;
    &lt;p&gt;Hello Again&lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>