i am having the following html.
<table>
<tbody>
<tr>
<td>text</td>
<td>text</td>
<td id='7'>xyz</td>
</tr>
<tr>
<td>text</td>
<td>text</td>
<td id='7' >xyz</td>
</tr>
<tr>
<td>text</td>
<td>text</td>
<td id='8'>xyz</td>
</tr>
<tr>
<td>text</td>
<td>text</td>
<td id='8'>xyz</td>
</tr>
<tr>
<td>text</td>
<td>text</td>
<td id='8'>xyz</td>
</tr>
<tr>
<td>text</td>
<td>text</td>
<td id='9' >xyz</td>
</tr>
<tr>
<td>text</td>
<td>text</td>
<td id='10' >xyz</td>
</tr>
<tr>
<td>text</td>
<td>text</td>
<td id='10'>xyz</td>
</tr>
</tbody>
</table>
in this table i want to merge those cells whose id value is same.
for example:
in each row i am having 3 cells. and i am dynamically assigning the id value to the 3rd cell of each row. now i want to merge those cells whose id values are same with each other. like all td's
those are having id as "7"
i want to merge them as single cell. similarly for td's
having id value as "8"
and "9"
as one cell. like this so on. how can i do this by using the jQuery or java script?