I’m wondering how i can do these things using jquery filter method:
Select cell 1 to 4 and 6 to 8 in on table row.
or
Select cell 1 and cell 6 to 8 in that table’s TR.
I’ve tested these methods but they weren’t useful.
For the first: filter(‘gt(2):lt(4),gt(7):lt(8))’
For the second: filter(‘eq(2),gt(7):lt(8)’)
in code bellow the results may be like (cell number 1 to 8 excluding cell5 for the first) and (cell1 cell 6 cell 7 cell 8 for the second
<table cellpadding="0" cellspacing="0" border="0" class="display" id="selection">
<tbody>
<tr>
<td>cell1</td>
<td>cell2</td>
<td>cell3</td>
<td>cell4</td>
<td>cell4</td>
<td>cell5</td>
<td>cell6</td>
<td>cell7</td>
<td>cell8</td>
</tr>
</tbody>
</table>
Thank you.
You can use jquery filter.
I don’t know how hard coded you want to do that, but this is a way to do that.