title: JavaScript's document.querySelector() same as jQuery $() method?
body: <p>I have been wondering why people glorified jQuery's <code>$(&quot;.myClass&quot;)</code> method when JavaScript has a generic <code>document.querySelector()</code>. Is there something I'm missing here? Why not just use the <code>document</code> object?</p>
  <p>I am completely new to JavaScript, so is there some type of con to <code>document.querySelector()</code> that I am not aware of?</p>
  <p>I'd really like to know, because I ran across something like this earlier and I'm wondering if it might help a situation I'm in:</p>
  <pre><code>var retrieve = function( s ) {
      return document.querySelector( s );
  };
  
  retrieve(&quot;.myClass&quot;).style.display = &quot;block&quot;;
  </code></pre>
  <hr />
  <h3>Note</h3>
  <p>I have nothing against jQuery at all. In fact, I love it. However, I'd rather not cheat myself using the easy pre-made ready-to-use tools when I'm just now trying to learn JavaScript.</p>
  <p>Any help would be much appreciated! :-)</p>