title: How to hide new elements in jQuery?
body: <p>I have this code:</p>
  
  <pre><code>var $msg = jQuery('&lt;div&gt;&lt;/div&gt;')
      .hide()
      .appendTo(document.body)
  ;
  if ($msg.is(":hidden")) {
      console.log("hidden");
  } else {
      console.log("visible");
  }
  </code></pre>
  
  <p>When run, it logs <code>"hidden"</code> on Firefox, but <code>"visible"</code> on Google Chrome. Is this a bug, or am I doing something wrong?</p>