Set focus on input field with jquery in specific table row -
i have following html:
<table> .... <tr> .... </tr> .... <tr id="myid"> <....> <input value="..." /> </....> </tr> <tr id="myanotherid"> <....> <input value="..." /> </....> </tr> </table>
how can set focus on input field in table row "myid" jquery ? can't set id on input field, because html generated automatically.
use table anchor , find input regardless of value.
$('table tr#myid').find('input:first').focus()
Comments
Post a Comment