title: How can I hide a div if a specific div does not exist using jQuery?
body: <pre><code>&lt;div class=“orange” style=&quot;width: 100%; overflow: hidden; position: relative; height: 160px;&quot;&gt;
      &lt;div class=“apple” group=&quot;group&quot; config=&quot;config&quot; context=&quot;context&quot;  applet=&quot;applet&quot; slider-items=&quot;sliderItems&quot; &gt;
          &lt;!-- ngRepeat: obj in sliderItems --&gt; &lt;!-- ngIf: sliderItems.length &gt; 0 --&gt;
          &lt;div ng-repeat=&quot;obj in sliderItems&quot; class=“grape&quot; ng-if=&quot;sliderItems.length &gt; 0&quot; ng-show=&quot;ready&quot; style=&quot;float: left; list-style: none; position: relative;  width: 240px;&quot; aria-hidden=&quot;false&quot;&gt; 
  </code></pre>
  <p>How do I hide class &quot;orange&quot; if the div with class &quot;grape&quot; does not exist or is hidden?  I believe this can be done with a line of jquery.</p>
  <p>(If not possible, how do I hide class &quot;orange&quot; if the length of sliderItems is 0?)</p>