prop()
Manipulate element attributes.
$(selector).prop(name, value?)
$(selector).prop(name, value?)Get property
const checked = $('#checkbox').prop("checked");Set property
$('#checkbox').prop("checked", true);
Get Live State
const isChecked = $('#notify').prop('checked');Set live state
$('#submitBtn').prop('disabled', true);Set states via Object
$('#settings').prop({ hidden: false, textContent: 'Settings Panel' });Last updated