--
You received this message because you are subscribed to the Google Groups "KnockoutJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knockoutjs+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I see. Is there something in particular you would recommend?
You received this message because you are subscribed to a topic in the Google Groups "KnockoutJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/knockoutjs/hAyDhatgor0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to knockoutjs+...@googlegroups.com.
var StockPrice=function(val){
var self=this;
this.color=ko.observable('white');
var _val=ko.observable(val);
this.value=ko.computed({
write: function(newValue){
if (_val()==newValue)
{
self.color('white');
return;
}
if (_val()<newValue){
self.color('red');
} else {
self.color('green');
}
},
read: function(){
return _val();
}
}
);
}
Thank you kindly. I'm going make the changes you suggest.