How can I get the target from the with td rowspan=4
Not sure about:
$("#fromTd").parent("tr").next().eq($("#fromTd").attr("rowspan")-1)
<table>
<tr>...</tr>
<tr>...</tr>
<tr><td id="fromTd" rowspan="4"></td></tr>
<tr>...</tr>
<tr>...</tr>
<tr>...</tr>
<tr>...</tr> -> target (can be aleatory position..)
</table>
Correct me if I am wrong but it sounds like what you want is to get the next
<tr>after X rows where X is the rowspan of a given<td>– 1. In other words, you want the next row into which that<td>will NOT extend.If that is the case, this should do the trick:
Here’s a live demo: http://jsfiddle.net/wLPA9/