Hi,
I have a wired behaviour when I try to disable or readonly a input field using the attr().
removeAttr('disabled')
is working ok.
attr('name', 'somthing')
is working
attr('id', 'something else')
is working
attr('disabled','disabled')
not working -> it writes only disabled="" in the DOM and it does not disable the input field
attr('readonly','readonly')
not working -> it writes only readonly="" in the DOM but the input field can still be edited.
$(document).ready(function() {
$("input[name='rdio']").live('click', function() {
$(".radio_select").find("input[name='rdio']").each(function(){
if(this.checked)
{
$("#"+this.value).removeAttr('disabled');
}
else
{
$("#"+this.value).attr('disabled','disabled');
}
});
});
});
Does anyone expirience this behaviour? BTW I'm using jquery 1.4.2
EDIT: Sorry, this was something I have tried and forgot to put it back. So with attr() the problem persists.