title: Create new element from selector?
body: <p>How can I create a new element using just a selector? (e.g. <code>.myclass</code>, <code>#myid</code> or <code>a:not(.someclass)</code>) Basically there is no way for you to tell if the element is a div, span, li, an anchor, if it's a div with a class or with an id and so on.</p>
  
  <p>In jQuery I know you can do <code>$(selector)</code> to get a usable DOM object. But how can this be done in JavaScript?</p>