Handling input disabled="disabled" and prop-checked state in HTML5
Should I use disabled="disabled" or only disabled ?
- For HTML,
<input type="text" disabled="disabled" />
is a safe markup. - For HTML5,
<input type="text" disabled />
is valid and preferred.
How to modify the checkbox state with jQuery :
- $(".mySelector").prop("checked", true);
How to modify the disabled state with jQuery :
- $(".mySelector").prop("disabled", true);
Recent Comments