Why don’t work?
var str;
$('table tr').each(function() {
str = $(this).find('td').eq(6).html().trim().substring(10, 20);
$(this).find('td').eq(6).text(str);
});
Need write in all 6th trim+substring+another_string_action with same value.
Firebug write error: $(this).find(“td”).eq(6).html() is null
Two things.
First, remember that not all browsers have a native
.trim()function. Safer to use jQuery’s$.trim().Second, remember that
.eq()takes a0based index, so if you want the sixth<td>column, pass5. Right now you’re asking for the seventh<td>.