All fields in a form come with readonly
.
I use the function below to remove the attribute from all inputs.
$('#form input').attr('readonly', false);
But I would like a way to do similar to toggle
of jQuery
Each time the user interacts with a particular element, change the status of readonly
.
Any suggestions?