So, in jQuery I can find the total number of a type of element with .find('selector').length, but how do I find out what n of the total the element is?

ie: How can I get back the information (n) that I've 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>

```