-
Book Overview & Buying
-
Table Of Contents
KnockoutJS Web Development
By :
We have included the following documents about observables just for reference here. While these were available online on the KnockoutJS site, it seemed like a good idea to include them here so you don't have to keep jumping between the website and the book.
A computed observable can be constructed using one of the following forms.
The ko.computed( evaluator [, targetObject, options] ) form supports the most common case of creating a computed observable. It has the following attributes:
evaluator: This is a function that is used to evaluate the computed observable's current value.
targetObject: If given, it defines the value of this whenever Knockout invokes your callback functions.
options: This is an object with further properties for the computed observable. See the full list in the following section.
The ko.computed( options ) parameter, is a single parameter form for creating a computed observable that accepts a JavaScript object with...
Change the font size
Change margin width
Change background colour