I have the following list
and I need to disable the radio button with a specific value how can I do that using JQuery
I have the following list
and I need to disable the radio button with a specific value how can I do that using JQuery
If you are using jQuery >= 1.6:
var desiredValue = 10; // or whatever value you need to disable
$("input[type=radio][value=" + desiredValue + "]").prop("disabled",true);
& If you are using jQuery < 1.6 do this:
var desiredValue = 10; // or whatever value you need to disable
$("input[type=radio][value=" + desiredValue + "]").attr("disabled","disabled");
Try the following:
$(":radio[value=15]").prop('disabled', 'disabled');
Edited 'attr' to 'prop' method, thanks Ashraf Bashir
UPDATE
If you want to use the jquery selector for the radio buttons only inside your 'ulTeams', use the following selector:
$("#ulTeams :radio[value=15]").prop('disabled', 'disabled');