title: Change background color if div has specific Child
body: <p>I am trying to change the background (and other styles) of a div if it has a specific child.  I am using .length to check if the specific child exists but even if it doesn't the div is taking the styles from the jquery if statement.  My HTML:</p>
  
  <pre><code>&lt;div class="full-text-panel"&gt;
          &lt;div class="main-wrap"&gt;
              &lt;h1 class="home-h1"&gt;This is a header&lt;/h1&gt;
              &lt;a class="body-button"&gt;This is a button&lt;/a&gt;
          &lt;/div&gt;&lt;!--end main-wrap--&gt;
      &lt;/div&gt;&lt;!--end full-text-panel--&gt;
  </code></pre>
  
  <p>And my jQuery:</p>
  
  <pre><code>            var fullText = $('.full-text-panel');
              var bodyButton = $('.body-button');
  
              if ( $(".full-text-panel .body-button").length &gt; 0 ) {
                  fullText.css("background", "red");
              } else {
                  fullText.css("background", "blue");
              }
  </code></pre>
  
  <p>I thought this would work, but both fullText panels are taking the background red style.  What am I doing wrong?</p>