title: Checking if a div class is present to hide another div
body: <p>I'm trying to get my div to hide if another div is present and after looking at examples online, I'm not sure what  I'm doing wrong on this. Any help is greatly appreciated. Thanks!</p>
  
  <pre><code>$('#required-field').toggle(!$('#gform_confirmation_message_1').length);
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="gforms_confirmation_message" class="gform_confirmation_message_1"&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;div id="gform_confirmation_wrapper_1" class="gform_confirmation_wrapper "&gt;
      &lt;div id="gform_confirmation_message_1" class="gform_confirmation_message_1 gform_confirmation_message"&gt;
        Thank you for contacting us. We will make every effort to respond to you inquiries shortly.
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="required-field"&gt;* Required Fields&lt;/div&gt;
  </code></pre>