jQuery('.price tbody').each(function() { jQuery(this).find('tr:not(.topRowTable)').each(function(i) { jQuery(this).find('td:first').text(++i + "."); }); });