You actually can do it this way:
$('tr>td:nth-child(3)');

The reason why eq(N) returns just one, is that you're telling it grab the
nth one you find out of a set.
The code I pasted above grabs the nth CHILD of the tr, so it will return
what you want.

Hope that helps :) 


Jacky-10 wrote:
> 
> Dear all,
> 
> If I want to select the 3rd column of the table, (e.g. 3 rows)
> $("tr > td:eq(2)") would returns only one <td>.
> $("tr").find("td:eq(2)") would returns 3 <td>.
> 
> Is that ":eq(2)" is applied to the whole "tr>td" set? Is that correct?
> 
> -- 
> Best Regards,
> Jacky
> 網絡暴民 http://jacky.seezone.net
> 
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Select-third-column-of-the-table-tf2964268.html#a8318538
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to