I am trying to change the value of the first cell in the last row of a table.
My code is:
$(document).ready(function() {
$('table.class tr:last td:first').html('Value');
});
But this code does not change anything, but if I put without: last and: first, it fills the whole table with value. What am I doing wrong?
Edit: my bad, the code works fine, but only for the last table with the class 'class'. What I need to do this on every table with this class. Any idea?
source
share