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

后端 未结 4 1410
庸人自扰
庸人自扰 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:12

    You can use the jQuery UI Position utility. Here is an example:

    $(".ui-autocomplete").position({
        my: "left bottom",
        at: "left top",
        of: $("#quick_add"),
        collision: "flip flip"
    });
    

提交回复
热议问题