jquery toggle attribute disabled 1

jquery toggle attribute disabled

$('#el').prop('disabled', function(i, v) { return !v; });

Here is what the above code is Doing:
1. Select the element with the id of el.
2. Set the disabled property to the opposite of what it currently is.
3. Return the new value of the disabled property.

Similar Posts