readonly in jquery code example
Example 1: add readonly attribute jquery
$(input).attr('readonly', true);
Example 2: how to set element readonly using jquery
To make an input readonly use: $("#fieldName"). attr('readonly','readonly');
$(input).attr('readonly', true);
To make an input readonly use: $("#fieldName"). attr('readonly','readonly');