SyntaxFix
Write A Post
Hire A Developer
Questions
It can even be made dependent to another attribute changes. like this:
$('.classA').toggleClass('classB', $('input').prop('disabled'));
In this case, classB are added each time the input is disabled
classB
disabled