jquery - Table row cell values update by using row number -
$('#mytable').parent(rownum).parent().find(".one").text(name); <table id="mytable" class="mytable"> <tr> <td class="mytd">name</td> <td class="mytd">age</td> <td class="mytd">gender</td> <td class="mytd">skills</td> <td class="mytd">note</td> </tr> <? while($row=mysql_fetch_array($res)){ ?> <tr> <td class='one'><? echo $row["name"];?></td> <td class='two'><? echo $row["age"];?></td> <td class='three'><? echo $row["gender"];?></td> <td class='four'><? echo $row["skills"];?></td> <td class='five'><? echo $row["note"] ;?></td> <td><button id='edit' value='edit'>edit</button></td> <td><button value='delete' id='delete'>delete</button></td> </tr> <? } ?> </table>
i want update selected tr cell value passing rownum parent updating cells of tr's.please help..
i think need this
$('#mytable tr').eq(rownum).find(".one").text(name)
Comments
Post a Comment