I have a problem with jQuery. I'm working on a table in which every <td>
has an <input>
inside. I use this in order to make the Tab key advance the focus by columns:
var i = 0;
$('#pl_table tr').each(function () {
$(this).find('td').each(function (i) {
$(this).find('input').attr('tabindex', i + 1);
});
});
My problem is it's not possible to select input values from table inputs if I use this code. Nor using Shift + arrows even with the mouse.
table row looks like this:
<tr class='tripRow nopair' id='1'>
<td class='drop'></td>
<td id='col1' class='check'>
<input name='tripRow1[]' type='checkbox' name='maked' value='marked' />
</td>
<td id='col2' class='center'>
<input name='tripRow1[]' type='text' value='' size='2' />
</td>
<td id='col3' class='center'>
<input name='tripRow1[]' type='text' value='' maxlength='10' size='10' readonly />
</td>
<td id='col4' class='center'>
<input name='tripRow1[]' type='text' value='' maxlength='6' size='4' />
</td>
<td id='col5' class='center'>
<input name='tripRow1[]' type='text' value='' maxlength='1' size='1' />
</td>
<td id='col6' class='center'>
<input class='dispatch' name='tripRow1[]' type='text' value='' />
</td>
<td id='col7' class='center'>
<input name='tripRow1[]' type='text' value='' />
</td>
<td id='col8' class='center'>
<input name='tripRow1[]' type='text' value='' maxlength='3' size='3' />
</td>
<td id='col9' class='center'>
<input name='tripRow1[]' type='text' value='' maxlength='10' size='10' />
</td>
<td id='col10' class='center'>
<input name='tripRow1[]' class='timePicker' type='text' value='' maxlength='8' size='8' />
</td>
<td id='col11' class='center'>
<input name='tripRow1[]' class='timePicker' type='text' value='' maxlength='8' size='8' />
</td>
<td id='col12' class='center'>
<input name='tripRow1[]' class='timePicker' type='text' value='' maxlength='8' size='8' />
</td>
</tr>
I know one of these <td>
s is readonly, but I have the problem with others also. I'm using IE10.
Any suggestions? Thank you very much for your help.