Created
August 1, 2011 14:00
-
-
Save nathanpalmer/1118170 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form data-bind="submit:addItem"> | |
Add item: <input type="text" data-bind='value:itemToAdd, valueUpdate: "afterkeydown"' /> | |
<button type="submit" data-bind="enable: itemToAdd.length > 0">Add</button> | |
</form> | |
<p>Your values:</p> | |
<select multiple="multiple" height="5" data-bind="options:allItems, selectedOptions:selectedItems"> </select> | |
<div> | |
<button data-bind="click: removeSelected, enable: selectedItems.length > 0">Remove</button> | |
<button data-bind="click: sort, enable: allItems.length > 1">Sort</button> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment