I wrote below code but there's no respond I switch my radio box. I want to disable unchecked radio checkbox.
http://jsfiddle.net/prxteafy/1/
<input class="radio-checkbox" type="radio" name="choice" value="custom_msg" checked>Custom Message :<br/>
<input style="width:200px" placeholder="your msg" type="text" id="custom_text"/>
<br/>
<input class="radio-checkbox" type="radio" name="choice" value="custom_img">Image :<br/>
<input style="width:200px" placeholder="an image url" type="text" id="custom_img"/>
my js
$(".radio-checkbox").change(function() {
if(this.checked) {
$(this).next().$("input").prop('disabled', true);
}
});
`s were immediate siblings. – Krzysztof Jabłoński Nov 12 '14 at 13:14