jQuery UI 自动完成:使用选项卡滚动建议菜单
当用户按下 Tab 键(并且同时在搜索字段中)时,我想滚动浏览 jQuery UI 自动完成建议。
我相信我的问题的答案与已经提出的问题的答案密切相关 这里。
$("#search").keypress(function (eventObject) {
if (eventObject.keyCode==13){
*what do I write here*
};
};
I would like to scroll through the jQuery UI autocomplete suggestions when the user presses the tab key (and is simultaneously in the search field).
I believe that the answer to my question is closely related to the answer to the question already asked here.
$("#search").keypress(function (eventObject) {
if (eventObject.keyCode==13){
*what do I write here*
};
};
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解您的要求,那么我认为 jQuery UI 自动完成不支持确切的场景。当您按下 Tab 时,您可以打开自动完成下拉列表,然后使用箭头键在项目列表中移动。
If I correctly understand your requirement then I don't think that exact scenario is supported with jQuery UI autocomplete. You can open the autocomplete drop down when you press tab and then use the arrow keys to move through the list of items.