【发布时间】:2015-09-01 07:27:44
【问题描述】:
我正在使用 jQuery UI 自动完成,就像在这个例子中一样: http://dev.nemikor.com/jquery-ui-extensions/autocomplete/html.html
但在我的“标签”键中,我有以下 HTLML:
<span class="whatever">whatever</span>
点击我正在使用的“whatever”类触发功能:
$(document).on('click', '.whatever', function() {
someFunction();
});
知道当用户专注于“whatever”而不是点击它时按“enter”时如何触发“someFunction()”吗?
【问题讨论】:
-
你需要绑定keyevents才能做到这一点
标签: jquery jquery-ui autocomplete