Consider this example:
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>
How can I get reference to <td>2</td>
?
I need reference as I want to trigger event on it.
Consider this example:
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>
How can I get reference to <td>2</td>
?
I need reference as I want to trigger event on it.
Just loop like:
$('table td').each(function() {
if ($(this).text() === '2') {
// trigger some event
$(this).doTheThing();
}
});