how to select n-th td of a tr using jquery
JavascriptJqueryHtmlJavascript Problem Overview
How can I select nth < td >
of a < tr >
using jquery. Say, I want to select 3rd < td >
. I have id for every tr. How can we achieve this ?
Javascript Solutions
Solution 1 - Javascript
Solution 2 - Javascript
the eq api should do this for you
$("table td").eq(n)
Solution 3 - Javascript
$('#id td:nth-child(3)');
Like so for the 3rd.