title: Comparing variable to empty jquery object in if condition
body: <p>In the jQuery accordion API, it says "If the accordion is collapsing, ui.newHeader and ui.newPanel will be empty jQuery objects."</p>
  
  <p>How can I check if ui.newheader is an empty jQuery object? I've tried it like this: </p>
  
  <pre><code>if ($(ui.newHeader) == null)
  {
      ...
  }
  </code></pre>
  
  <p>,like this:</p>
  
  <pre><code>if (ui.newHeader == null)
  {
      ...
  }
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>if ($(ui.newHeader) == "")
  {
      ...
  }
  </code></pre>
  
  <p>So basically, this is a question about jquery/javascript syntax :) Thanks</p>