title: Hide a div if sibling has an specific class
body: <p>I have a div with the <code>grafico</code> class, and it has two children. One of them, the one with "terminal-alert" class, should not appear if it's sibling, the <code>grafico-arc</code> has the specific "green" class.
  I tried the jquery below, and managed to hide the "terminal-alert" div, but it does not appear on the ones where the sibling doesn't have the "green" class.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".grafico-arc").each(function() {
    if ($(this).hasClass("green")) {
      $(".terminal-alert").siblings().css("display", "none");
    }
  });</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="sliderCard"&gt;
    &lt;div class="grafico"&gt;
  
      &lt;div class="grafico-arc green"&gt;
        &lt;div class="topo"&gt;&lt;/div&gt;
  
        &lt;div class="consumoTerminal"&gt;
          &lt;h3&gt;1 &lt;span&gt;GB&lt;/span&gt;&lt;/h3&gt;
          &lt;p&gt;(21) 98899-0805&lt;/p&gt;
          &lt;button class="detail"&gt;&lt;/button&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;
  
      &lt;div class="terminal-alert"&gt;
        &lt;p&gt;Saldo esgotando &lt;a href="#"&gt;Mais internet&lt;/a&gt;&lt;/p&gt;
      &lt;/div&gt;
  
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="sliderCard"&gt;
    &lt;div class="grafico"&gt;
  
      &lt;div class="grafico-arc yellow"&gt;
        &lt;div class="topo"&gt;&lt;/div&gt;
  
        &lt;div class="consumoTerminal"&gt;
          &lt;h3&gt;2 &lt;span&gt;GB&lt;/span&gt;&lt;/h3&gt;
          &lt;p&gt;(21) 98899-0805&lt;/p&gt;
          &lt;button class="detail"&gt;&lt;/button&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;
  
      &lt;div class="terminal-alert"&gt;
        &lt;p&gt;Saldo esgotando &lt;a href="#"&gt;Mais internet&lt;/a&gt;&lt;/p&gt;
      &lt;/div&gt;
  
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="sliderCard"&gt;
    &lt;div class="grafico"&gt;
  
      &lt;div class="grafico-arc red"&gt;
        &lt;div class="topo"&gt;&lt;/div&gt;
  
        &lt;div class="consumoTerminal"&gt;
          &lt;h3&gt;3 &lt;span&gt;GB&lt;/span&gt;&lt;/h3&gt;
          &lt;p&gt;(21) 98899-0805&lt;/p&gt;
          &lt;button class="detail"&gt;&lt;/button&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;
  
      &lt;div class="terminal-alert"&gt;
        &lt;p&gt;Saldo esgotando &lt;a href="#"&gt;Mais internet&lt;/a&gt;&lt;/p&gt;
      &lt;/div&gt;
  
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>