How to disable radio buttons after selecting one using jquery

<script>jQuery(":radio").click(function(){ var radioName = jQuery(this).attr("name"); //Get radio name jQuery(":radio[name='"+radioName+"']").attr("disabled", true); //Disable all with the same name });</script>

This is disabled all other radio button with same name when you select one. I found this code from stackoverflow website, hope it will help others.

Leave a Reply

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