vignesh vignesh - 1 year ago 69
jQuery Question

how can i group radio buttons that are in different div tag

I have radio buttons placed in different

div


See the below example

HTML

<div><input type="radio"/></div>
<div><input type="radio"/></div>
<div><input type="radio"/></div>
<div><input type="radio"/></div>


So how can i make only one of these selectable??

Live jsfiddle here

Answer Source

add an attribute name="myRadio" for each radio.