Getting ul li a title attribute with nth-child?
<p>I have been plugging in all sorts of combination to get the the "title" attribute value via JQuery. I have googled hard and searched for the past couple of hours. My code is only able to get the "li" anchor title but cannot seem to get the other. I would appreciate it if you someone can point out what am I not doing right, please.</p>

<p>HTML</p>

<pre><code>&lt;nav&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href="#" title="honda"&gt;HONDA&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" title="toyota"&gt;TOYOTA&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" title="nissan"&gt;NISSAN&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" title="mazda"&gt;MAZDA&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/nav&gt;
</code></pre>

<p>Works for the very first child</p>

<pre><code>alert($("nav li a:nth-child(1)").attr("title"));
</code></pre>

<p>Doesn't work for other children</p>

<pre><code>alert($("nav li a:nth-child(2)").attr("title"));
</code></pre>

<p>Thank you.</p>
