Knockout: Built-In Bindings
Index
@john_papa
Bindings
Target Value
Source Value(s)
text
html
details:
value
text input
model.code:
value
text input with change on each keystroke
salePrice:
checked
checkbox
isInStock:
checked and value
radio buttons
brown
blue
black
selectedColorForRadio:
checked and value
radio buttons (with foreach)
selectedColorForRadio:
options, value, optionsText, optionsValue
select (single selection dropdowns)
selectedColor:
options, selectedOptions, optionsText, optionsValue
select (multiple selection dropdowns)
selectedColorsForDropDown:
enable
allowEditing:
disable
is readonly:
hasfocus
set focus to checkbox
checkbox has focus
textbox has focus
button has focus
checkboxHasFocus:
checkbox has focus
textboxHasFocus:
textbox has focus
buttonHasFocus:
button has focus
uniqueName
use unique name:
click
display value
userInput:
event
detailsAreVisible:
visible
onSalesFloor:
css
profit < 0:
style
profit < 0:
attr
a
url:
attr
img
photoUrl: