I have a huge datatable with a lot of pages, and I have to count the rows that have a specific value.
How can I count across all pages?
Examples ...
Html:
<tr class="item_line odd" role="row">
<td>
<i class="fa fa-chevron-down hover-blue" onclick="Toogle(this)"></i>
<label class="right"><input name="Items[%INDEX_ITEM%].Item" class="input-light input-xs width50" style="width: 50px !important;" onkeypress="return onlyInt(event);" type="text" value="10"></label>
</td>
<td><span>MM0123455</span></td>
<td>COMPOSTO 10KG</td>
</tr>
jQuery:
// ....
if ($(":input[name='Items[%INDEX_ITEM%].Item'][value='" + item +"']").length == 0) {
// ....
} else {
// ....
}
// ....
Fiddle: (https://jsfiddle.net/na406ffv)