title: JQuery hide Class if other class is visible or shown
body: <p>Found similar questions but nothing that covers exactly what I need.  I kept it simple in my example and I want to use JQuery.</p>
  
  <p>I have two classes.  I want to hide the "filter" div if the "category" div is shown on page load.  There are currently NO styles associated with either class. I believe I am pretty close but it doesn't work.</p>
  
  <pre><code>&lt;script language="text/javascript"&gt;
  if(!$(this).hasClass("category")){
  $('filter').css('display', 'none');
  }
  &lt;/script&gt;
  
  &lt;div class="category"&gt;By Category&lt;/div&gt;
  &lt;div class="filter"&gt;By Custom Filter&lt;/div&gt;
  </code></pre>
  
  <p>Thanks in advance!</p>