Created
April 6, 2012 13:51
-
-
Save sofish/2319950 to your computer and use it in GitHub Desktop.
This file contains hidden or 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: function () { | |
| var val = this.$menu.find('.active').attr('data-value') | |
| this.$element.val(val) | |
| this.$element.change(); | |
| // 考拉:添加这行 | |
| this.$element.trigger('selected'); | |
| return this.hide() | |
| } | |
| 其后用 `on` 来搞她: | |
| TypeaheadInputElement.on('selected', function(){ | |
| // 选择做点什么 | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment