Даниэль А. Уайт уже указал на вашу конкретную проблему, но если бы вы работали с классами CSS на регулярной основе, я бы рекомендовал использовать привязку css
.
http://knockoutjs.com/documentation/css-binding.html
<div data-bind="css: { profitWarning: currentProfit() < 0 }">
Profit Information
</div>
<script type="text/javascript">
var viewModel = {
currentProfit: ko.observable(150000) // Positive value, so initially we don't apply the "profitWarning" class
};
viewModel.currentProfit(-50); // Causes the "profitWarning" class to be applied
</script>