Hi, I am trying to select specific element types in a row and change their attribute, specifically the id and name attributes.
Using the following works fine for single line text input boxes:
$('input:text', newRow).attr('id','os' + newRowNum ).attr('name','os' + newRowNum );
however, when I change the html to:
<td><textarea name="os2" cols="24" rows="3" id="os2"></textarea></td>
the script will no longer find the attributes and change them. A textarea is an input element ... no?
I have also tried:
$('input:text, textbox', newRow).attr('id','os' + newRowNum ).attr('name','os' + newRowNum );
and
$('input[type=text], textbox', newRow).attr('id','os' + newRowNum ).attr('name','os' + newRowNum );
but neither work.
What am I missing here?
Dave