Say I got a few DIV tags in a HTML page like:
<DIV ID="all">
<DIV ID="div1">
<Input type="radio" name="data['site1']['user']" VALUE="1">user1<br/>
</DIV>
<DIV ID="div2">
<Input type="radio" name="data['site1']['user']" VALUE="2">user2<br/>
</DIV>
<DIV ID="div3">
<Input type="radio" name="data['site1']['user']" VALUE="3">user3<br/>
</DIV>
<DIV ID="div4">
<Input type="radio" name="data['site1']['user']" VALUE="4">user4<br/>
</DIV>
</DIV>
Is it possible to do the same effect in JQuery like this:
Document.getElementByID('div2').focus();
The equivalent of that is:
but you can only focus on a form element so:
will focus on the first form element inside the element with ID div2.