I have a simple add attribute function:
$(\".list-toggle\").click(function() { $(\".list-sort\").attr(\'colspan\', 6); });
My question is:
For readonly/disabled and other attributes with true/false values
$(':submit').attr('disabled', function(_, attr){ return !attr});