title: jquery nth-child click
body: <p>I have the following code:</p>
  
  <p>css:</p>
  
  <pre><code>nav div:nth-child(1) { background: red; }
  nav div:nth-child(2) { background: blue; }
  nav div:nth-child(3) { background: yellow; }
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>&lt;nav&gt;
   &lt;div&gt;item #1&lt;/div&gt;
   &lt;div&gt;item #2&lt;/div&gt;
   &lt;div&gt;item #3&lt;/div&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>jquery:</p>
  
  <pre><code>  $(document).ready(function() {
  
        $('.nav div:nth-child').click(function) {
            console.log(this);
        });
  
    });
  </code></pre>
  
  <p><strong>edit:</strong> i get now: <strong>uncaught exception: Syntax error, unrecognized expression: :nth-child</strong></p>
  
  <p>How to click on the nth-child using jquery and get the item number like CSS do? eg: i click on the second one, jquery will return 2</p>