Change jQuery UI Autocomplete Position - Pop up, instead of down

后端 未结 4 1406
庸人自扰
庸人自扰 2020-12-08 10:23

I am placing an autocomplete box at the bottom of my page and I would like the results to pop up OVER the text box, instead of below. How can I do this?

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 11:15

    Putting @mvonlintel's answer in another way, set the suggestions menu position in the widget declaration:

    $('selector').autocomplete(
    {
        position: { my: "left bottom", at: "left top", collision: "flip" },
        .
        .
    });
    

提交回复
热议问题