The knockout.js documentation shows the css binding like this:
Profit Information
The simplest way is to use a click binding which changes an observable in the callback. You would bind the class appropriately using something like the attr binding