I have an html table and I’m wondering if there is a way that I could find the number of occurrences of a given number and display them on the page with jquery?
Occurence of 4: 1
Occurence of 11: 2
.
.
. etc…
<table id='tab' width="35%" border="1">
<tr>
<td>3</td>
<td>4</td>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>11</td>
<td>8</td>
<td>7</td>
</tr>
<tr>
<td>6</td>
<td>6</td>
<td>11</td>
<td>7</td>
</tr>
<tr>
<td>5</td>
<td>4</td>
<td>20</td>
<td>7</td>
</tr>
</table>