For text input I do:
input
$(\'input[type=\"text\"]\').each(function(){ $(this).attr(\'readonly\',\'readonly\'); });
But what shou
You can write
$("textarea").attr("readonly", "readonly");
this will make readonly to all textarea fields.