Reputation: 2337
Consider the following, how do get the last element of a particular data attribute value?
<tr data-log="sectionA"><td>Log Information</td></tr>
<tr data-log="sectionA"><td>Log Information</td></tr>
<tr data-log="sectionA"><td>Log Information</td></tr>
<tr data-log="sectionA"><td>Log Information</td></tr> <--- I need this last element of sectionA
<tr data-log="sectionB"><td>Log Information</td></tr>
<tr data-log="sectionB"><td>Log Information</td></tr>
<tr data-log="sectionB"><td>Log Information</td></tr>
<tr data-log="sectionB"><td>Log Information</td></tr>
I'm not sure what to try.. thanks for any ideas...
Upvotes: 3
Views: 868