Return ID of Fieldset after radio button is selected?
Hi, I four roles of input buttons that form a grid, i.e when one item is chosen the equivalent buttons in the other rows are switched off.
I have the radio buttons attached to a click handler().
All works fine but is it possible to return the id of the fieldset in this case it would be either fieldset1 or fieldset2. when a radio button is selected?
- $(".a, .b,").click(function(){
- // From here return fiedlset ID
- };
- <fieldset data-role="controlgroup" data-type="horizontal" id="fieldset1" class="radioButt">
- <input type="radio" name="a" id="a" class="r" data-theme="a"/>
- <label for="a">1st</label>
- <input type="radio" name="a" id="a" class="r" data-theme="a"/>
- <label for="a">2nd</label>
- <input type="radio" name="a" id="a" class="r" data-theme="a"/>
- <label for="a">3rd</label>
- <input type="radio" name="a" id="a" class="r" data-theme="a"/>
- <label for="a">4th</label>
- </fieldset>
- <fieldset data-role="controlgroup" data-type="horizontal" id="fieldset2" class="radioButt">
- <input type="radio" name="b" id="b" class="r" data-theme="b"/>
- <label for="b">1st</label>
- <input type="radio" name="b" id="b" class="r" data-theme="b"/>
- <label for="b">2nd</label>
- <input type="radio" name="b" id="b" class="r" data-theme="b"/>
- <label for="b">3rd</label>
- <input type="radio" name="b" id="b" class="r" data-theme="b"/>
- <label for="b">4th</label>
- </fieldset>
-
Thanks in advance,
Lammie.