Skip to content

Instantly share code, notes, and snippets.

@nathanpalmer
Created July 31, 2011 03:05
Show Gist options
  • Save nathanpalmer/1116331 to your computer and use it in GitHub Desktop.
Save nathanpalmer/1116331 to your computer and use it in GitHub Desktop.
<form data-bind="submit: addItem">
New item:
<input data-bind='value: itemToAdd, valueUpdate: "afterkeydown"' />
<button type="submit" data-bind="enable: itemToAdd.length > 0">Add</button>
<p>Your items:</p>
<select multiple="multiple" width="50" data-bind="options: items"> </select>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment