// this works on IE
// disable
$('#myDiv').attr('disabled', 'disabled');
// enable
$('#myDiv').attr('disabled', '');
Disabling the whole div doesn't seem to disable inputs in chrome and firefox though, so here's the alternative version drilling down to each single input elements:
// this works everywhere but looks weird in IE
// disable $('#myDiv :input').attr('disabled', 'disabled');
// enable
$('#myDiv :input').attr('disabled', '');
Good hacking.
2 comments:
Thanks. It saved me a lot of time. Was wondering for a long time why the div was not disabled in Mozilla.
thanks...it's work properly in Google Chrome.i save my time by using this code
Post a Comment