I have a table and on each row I add some attributes that later I need to get when I click on the row with jQuery.
Here is a sample of a <tr> element:
<tr data-id="1" data-employeeid="4" data-acceess="none" data-area="HR">
<td class="sorting_1" tabindex="0">ID 01</td>
<td>This is a custom descriptiion</td>
</tr>
I would like to build a json object based on data.* attributes but also adding the column values.
So in this example I would like to get something like this:
{'employeeid':'4', 'access':'none', 'area':'HR', 'data1':'ID 01', 'data2':'This is a custom description'}
Any clue?
data-accessetc.