Jquery to check only one radio button among two radioButtonList

Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  

$(document).ready(function () {
         
        $(‘form’).delegate(‘.radiogroup :radio’, ‘click’, function () {
            $parent = $(this).closest(‘.radiogroup’);

            $(‘:radio’, $parent).attr(‘checked’, false);
            $(this).attr(‘checked’, true);
        });
    });

 

form==> <form>
.radiogroup==> Parent Div of the Both RadioButtonList
:radio ==> type=”radio”


Share the joy
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.