Revert "Simplified toggleClass API."

This reverts commit 01d946687b2491263b275e8e4e512c3b55eada40.