Tuesday, January 31, 2012

jQuery Mobile – Toggle enable and disable state of a radio button


I have a radio button that I would like to be able to enable and disable through jQuery Mobile.



Radio button code:




<input type="radio" disabled="disabled" value="option1" />



tried:




$('input[type="radio"]').removeAttr('disabled');



and




$('input[type="radio"]').attr('disabled', '');



Neither of which seem to be able to toggle the button to enabled.

No comments:

Post a Comment