There is a situation where I need to render an input text as disabled, and for this purpose, I have employed the following code snippet:
$('#id').attr('disabled', 'disabled');
Is there any alternative method to disable an input text without directly modifying the disabled attribute? For instance, could CSS or some other approach be used instead?
In essence, I am seeking a way for an input text to behave like it's disabled without actually changing its attribute.
Warm regards.