Assuming I have a table with column and row spans I am looking for a way to find the header that uniquely identifies a cell.
For this table:
table {
border-collapse: collapse;
}
table, td, th {
border: 1px solid gray;
}
<table>
<thead>
<tr>
<th colspan="2">col1</th>
<th rowspan="2">col2</th>
<th rowspan="3">col3</th>
</tr>
<tr>
<th>col4</th>
</tr>
<tr>
<th colspan="2">col5</th>
<th>col7</th>
</tr>
</thead>
<tbody>
<tr>
<td>value</td>
<td>value1</td>
<td>value2</td>
<td>value3</td>
</tr>
</tbody>
</table>
https://jsfiddle.net/j3kqrpt0/
I would like to get the following header
col5 | col5 | col3 | col7 |
---|