So, in jQuery, I can find the total number of an element type with a length of .find ('selector'). but how do you know that n is from a common element?
ie: How can I get the information (n) that I clicked on the first or second (or nth) button?
eg:
<table class="table-edit-components">
<tr>
<td>
<div class="resource-links">
...
</div>
<button type="button" class="add-resource-link"></button>
</td>
<td>
<div class="resource-links">
...
</div>
<button type="button" class="add-resource-link"></button>
</td>
</tr>
</table>
source
share