tags:

views:

84

answers:

2

I have a table when I click on a table row I can fetch the row with this but how can I get the value from the last td in the tr tag?

$(this); // equals my hovered tr row

I thought of something like this:

$(this:last-child).text();

Or should it be like this:

$(this + ":last-child").text(); or with .html();
A: 
$('#' + this.id + ' :last-child').text();

is the same as:

$('#idOfMyTr :last-child').text();
karim79
+3  A: 

You can try with:

$(this).find(':last-child').text();

Or :

$(':last-child', this).text();
CMS
+1... 1 second late, but better explained :)
Seb