rowspanx

rowspanx

by Stjepan Brbot

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table width="100" border="1" id="table">
   <tr>
      <th rowspan="2">10:00</th>
      <td rowspan="1" rowspanx="2">test</td>
      <td rowspan="1" rowspanx="2">test</td>
      <td rowspan="1" rowspanx="1"></td>
      <td rowspan="1" rowspanx="1"></td>
   </tr>
   <tr>
      <td rowspan="1" rowspanx="1"></td>
      <td rowspan="1" rowspanx="1"></td>
   </tr>
</table>

JavaScript

$('#table tr td').each(function()
{
		if($(this).attr("rowspanx")==1)
    {
			$(this).attr("rowspan","2");
		}
});