title: Difference between CSS selector and jQuery filter?
body: <p>It is possible to pass CSS selectors to the jQuery function such as:</p>
  
  <pre><code>jQuery('h1 + h2');
  </code></pre>
  
  <p>jQuery also has some filters such as <code>:even</code> and <code>:odd</code>:</p>
  
  <pre><code>jQuery('tr:even');
  </code></pre>
  
  <p>I was looking for some sort of syntax rule which differentiates the two and I was thinking that maybe the jQuery filters always use a <code>:</code>.</p>
  
  <p>However, some <a href="http://www.w3.org/TR/selectors" rel="nofollow">CSS selectors</a> also use a <code>:</code>. For example:</p>
  
  <ul>
  <li><code>:last-child</code></li>
  <li><code>:root</code></li>
  <li><code>:empty</code></li>
  <li><code>:target</code></li>
  </ul>
  
  <p>Does anyone have any smart tips for knowing if it is a CSS selector or a jQuery filter being used?</p>