Created
October 2, 2014 10:14
-
-
Save nasum/f2df6a989b39029fe363 to your computer and use it in GitHub Desktop.
optionタグをクリックして発火させたい関数があるときeventバインディングを使う(KnockoutJSを用いて) ref: http://qiita.com/tomato360/items/a3e134efae5cd3004247
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
<select> | |
<option data-bind="click : $root.hoge">hoge</option> | |
<option data-bind="click : $root.hoge">fuga</option> | |
</select> |
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
<select data-bind="event : $root.hoge"> | |
<option>hoge</option> | |
<option>fuga</option> | |
</select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment