Skip to content Skip to sidebar Skip to footer

Trouble Getting Count Of Table Rows That Contain Certain Text

I am trying to output the count of table rows that contain certain text into a label. When I step through my JavaScript, the count variable initially contains the count, but then e

Solution 1:

Something like this(using contains):

$(function(){
   var myRows = $("#match-table tr:contains('Pending Credit')");
   $("#result").html(myRows.length + " Pending");
});

Working fiddle: https://jsfiddle.net/robertrozas/rdesdnqm/


Post a Comment for "Trouble Getting Count Of Table Rows That Contain Certain Text"