gtilflm gtilflm - 2 years ago 64
jQuery Question

Select innerHTML from First <td> of Last <tr> -- jQuery

I have some rows in a table like this:

<tr class="problem_display_work>
which have two
s each.

I'm trying to select/alert the innerHTML like this:
alert($('tr.problem_display_work td:first-child').innerHTML);
but it's not working.

What am I missing here?

Answer Source


alert($('tr.problem_display_work td:first').html());

edit for last tr

alert($('tr.problem_display_work:last td:first').html());
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download