What's the best way to find the last non-empty row in a table? "non-empty" = at least one table cell in the row contains text
Is there a better way than this? var last = 0; $("#table1 tr)".each(function(i) { if ($(this).children("td:not(:empty)").size() > 0) { last = i; } }); Thanks!