开发者

jQuery.UI.autocomplete widget, automatically role up the list instead of roling down if there isn't enought room

开发者 https://www.devze.com 2023-01-09 00:39 出处:网络
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

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开发者_JAVA技巧 below the textbox (like normal dropdown list)?


Use

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

精彩评论

暂无评论...
验证码 换一张
取 消