title: JQuery selectors: use of document, body and quotes inconsistent
body: <p>Basic selectors are of the forms:</p>
  
  <pre><code>jQuery( element )
  jQuery( selector [, context ] )
  </code></pre>
  
  <p>HTML elements work fine if quoted:</p>
  
  <pre><code>$("div").length    // value is 2
  $("body").length   // value is 1
  $(body).length     // Uncaught ReferenceError: body is not defined 
  </code></pre>
  
  <p>Yet document and document.body both work without quotes:</p>
  
  <pre><code>$(document).length         // value is 1
  $(document.body).length    // value is 1
  $("document").length       // value is 0
  $("document.body").length  // value is 0
  </code></pre>
  
  <p>Question 1: Are there any other jQuery elements/selectors that work without quotes?</p>
  
  <p>Question 2: Why does document and document.body fail with quotes?</p>
  
  <p>I understand "document" is not an HTML element like <code>&lt;body&gt;</code> and may be a special case. Which leads me to my last question.</p>
  
  <p>Question 3: Why does document.body work but the following return a length of 0?</p>
  
  <pre><code>$(document.body.div).length         // value is 0
  $("document.body.div").length       // value is 0
  </code></pre>
  
  <p>jQuery selector syntax:  <a href="http://api.jquery.com/jQuery/#jQuery-elementArray" rel="noreferrer">http://api.jquery.com/jQuery/#jQuery-elementArray</a></p>
  
  <p>CSS 3 selectors:   <a href="http://www.w3.org/TR/css3-selectors/#type-selectors" rel="noreferrer">http://www.w3.org/TR/css3-selectors/#type-selectors</a></p>