title: How can you tell the difference between a generated and a selected element?
body: <p>Is it possible, in either the jQuery API or the DOM, to check if an element exists on the page or not?</p>
  
  <p>Consider these two variables:</p>
  
  <pre><code>var selected = $('span#mySpan');
  var created = $('&lt;span id="mySpan"&gt;Testing&lt;/span&gt;');
  </code></pre>
  
  <p>Both will return a jQuery object containing a span element. Is there any way to tell that the first exists on the page, and the second one does not?</p>