toggle attribute jquery code example
Example 1: jquery toggle attribute disabled
$('#el').prop('disabled', function(i, v) { return !v; });
Example 2: toggle class jquery
toggleClass
Example 3: toggle attribute jquery
// Troggle attribute in jquery
$( selector ).attr('disabled', function(_, attr){ return !attr});