jQuery attr() working for first element only
<p>I don't understand why attr() get called for only one time,</p>

<p>my html is</p>

<pre><code>&lt;table id="myTable"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;...&lt;/td&gt;
            &lt;td&gt;...&lt;/td&gt;
            &lt;td&gt;
                &lt;abbr title='first'&gt;Demo1&lt;/abbr&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;...&lt;/td&gt;
            &lt;td&gt;...&lt;/td&gt;
            &lt;td&gt;
                &lt;abbr title='second'&gt;Demo2&lt;/abbr&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        .
        .
        .
    &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>

<p>now I want to get "title" of all <code>abbr</code>  so wrote following query</p>

<pre><code>$(document).ready(function () {
    console.log($('#myTable tr td:nth-child(3) abbr').attr("title"));
}
</code></pre>

<p>So, it should return me </p>

<pre><code>first
second
.
.
.
</code></pre>

<p>but output is only <code>"first"</code>,   </p>

<p>but if write</p>

<pre><code>var oRows = $('#myTable tbody tr');
$.each(oRows, function (i) {
    console.log($(this).children('td:nth-child(5)').children().attr("title"));
});
</code></pre>

<p>then I am getting right output.
but I don't think it is a proper approach, so can any body please tell me where I am going wrong.</p>

<p>Also I read <a href="http://stackoverflow.com/questions/3306414/jquerys-attr-function-works-only-one-time">this</a> answer, but still I am not clear</p>

<p>Thank you</p>
