I would like iterate through the last column in an html table and skip the first row.

I have an html table and I would like iterate through the last column in the table and skip the first row. The table is dynamic so I won't know how many columns there will be.
dmalovichAsked:
Who is Participating?
 
Chris StanyonConnect With a Mentor Commented:
No worries. I've updated the fiddle, so have a play:

$('tr').not(':first').each(function(i,row) {
    console.log(  $('td:last input', row).val()  );
});

Open in new window

0
 
Chris StanyonCommented:
Have a look at this:

$('tr').not(':first').each(function(i,row) {
    console.log( $('td:last', row).text() );
});

Open in new window

http://jsfiddle.net/ChrisStanyon/AnJ8r/
0
 
dmalovichAuthor Commented:
Yes, great thank you. Each td has an input text field. Is there an easy way to grab the value of the text field as I iterate through the column. If you would like, I can ask this as another question.
0
 
dmalovichAuthor Commented:
Perfect, thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.