jQuery.UI.autocomplete 小部件,如果没有足够的空间,则自动向上滚动列表而不是向下滚动

发布于 2024-09-11 01:09:08 字数 191 浏览 0 评论 0原文

我正在使用 jQuery.UI.autocomplete 小部件。自动完成小部件绑定的文本框几乎位于页面(表单)的底部,因此当用户开始在那里输入时,列表会向下滚动到屏幕之外,因此您必须在浏览器中向下滚动页面才能查看完整列表而文本框上方有足够的空间。

如果文本框下方没有足够的可见空间(如正常的下拉列表),是否有任何方法可以使列表向上移动而不是向下移动?

I'm using jQuery.UI.autocomplete widget. The textbox which autocomplete widget is bound to is located almost at the bottom of the page (form) so when user starts typing in there, the list roles down out of screen so you have to scroll down the page in browser to see the complete list while there are plenty of room above the textbox.

Is there any way to get the list to role up instead of role down if there isn't enough visible space below the textbox (like normal dropdown list)?

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

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

发布评论

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

评论(1

洋洋洒洒 2024-09-18 01:09:08

使用

input.autocomplete({
    ...
    position: { collision: 'flip flip' }
}

Use

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