Link to home
Start Free TrialLog in
Avatar of dmalovich
dmalovich

asked on

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.
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

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/
Avatar of dmalovich
dmalovich

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect, thanks