I have created a jsFfiddle for you using your code..
Code:-
$(document).ready(function() {
$("table tr").each(function() {
if ($(this).find("td[data-name="stage: completed "]").length == 5)
$(this).addClass("green")
})
});
and its performance is also good..
working example:-
http://jsfiddle.net/BtkCf/172/
to see the its performance see this link and open console see time taken by this code.
http://jsfiddle.net/BtkCf/173/
thanks
1
solved jQuery count tr with some condition in td