I’d like to make a toggle button for each group of <input type=“radio” />s where the name attribute is the same.
So I need a way to select all radio inputs where the name is the same AND there are only two of them.
So, the first two radio inputs would be selected here:
<input type="radio" name="blubber" value="more, please" />
<input type="radio" name="blubber" value="none" />
<input type="radio" name="living room" value="6" />
But none would be selected here:
<input type="radio" name="blubber" value="more, please" />
<input type="radio" name="blubber" value="just a little bit, please" />
<input type="radio" name="blubber" value="none" />
<input type="radio" name="living room" value="6" />
<input type="radio" name="fireplace" value="santa claus" />
Thanks