Jquery Autocomplete - 自动建议插件问题

发布于 2024-11-24 06:44:20 字数 247 浏览 5 评论 0原文

我使用这个插件 http://code.drewwilson.com/entry/autosuggest-jquery-plugin 输入“MAS”时没有匹配的数据,因此显示“未找到数据”,但同时 如果我按 Tab 键“MAS”,并且删除符号出现在我的文本字段中..

对此有任何解决方案

I using this plugin http://code.drewwilson.com/entry/autosuggest-jquery-plugin
While typing "MAS" there is no data matched, so its displaying "NO data found", but at the same time
if i press tab key "MAS" with delete symbol appearing in my text field..

any solution for this

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

感情旳空白 2024-12-01 06:44:20

该特定插件支持“选项卡”以使用多个用户选择选项。

如果您正在寻找简单的自动完成插件。
尝试

a)使用不同的插件 - 谷歌它,大量的插件,这里还有一个答案的链接
https://stackoverflow.com/questions/188442/whats-a- good-ajax-autocomplete-plugin-for-jquery

b) 从该插件中删除 tab 键处理程序。下载插件并删除选项卡处理程序。
或如文档所述 http://code.drewwilson.com/entry/autosuggest-jquery -插件;尝试为 selectionAdded 编写自己的事件处理程序

:回调函数 - 通过从“结果”下拉列表中选择一项或使用制表符/逗号键添加一项来进行选择时运行的自定义函数。选择项作为“elem”传递到此回调函数中。
示例:selectionAdded: function(elem){ elem.fadeTo("slow", 0.33);

selectionRemoved:回调函数 - 当使用删除键或单击所选内容内的“x”从 AutoSuggest 中删除所选内容时运行的自定义函数。选择项作为“elem”传递到此回调函数中。
示例:selectionRemoved: function(elem){ elem.fadeTo("fast", 0, function(){ elem.remove(); }); }

That particular plugin supports "tabbing" to use multiple user selection choices.

If you are looking for plain auto-complete plugin.
try

a) Use a different plugin - google it, tons of them, also here's a link to an answer
https://stackoverflow.com/questions/188442/whats-a-good-ajax-autocomplete-plugin-for-jquery

b) Remove the tab key handler from that plugin. Download the plugin and remove the tab handler.
or as the documentation says http://code.drewwilson.com/entry/autosuggest-jquery-plugin; try writing your own event handlers for

selectionAdded: callback function - Custom function that is run when a selection is made by choosing one from the Results dropdown, or by using the tab/comma keys to add one. The selection item is passed into this callback function as 'elem'.
Example: selectionAdded: function(elem){ elem.fadeTo("slow", 0.33); }

selectionRemoved: callback function - Custom function that is run when a selection removed from the AutoSuggest by using the delete key or by clicking the "x" inside the selection. The selection item is passed into this callback function as 'elem'.
Example: selectionRemoved: function(elem){ elem.fadeTo("fast", 0, function(){ elem.remove(); }); }

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文