Jquery UI Autocomplete appends to body rather than the given object in JQ UI Version 1.8.6

jquery, jquery-ui

Solution

You can use option "appendTo"

$("#input").autocomplete({
    appendTo: $("#input").next()
});

But this can only append to some container as you suspect. If you want to be able to append autocomplete right after your input then you have to tweak the autocomplete source directly (change appendTo() for after())

Problem

Ive been using jquery auto-completes on my web page for a while , but after updating jquery ui to version 1.8.6 from 1.8rc3 , the autocomplete ul object is now appended to the body rather than directly after the given selector. The code below is not valid of course, it just highlights the problem im having. In 1.8rc3 ``` $("#myinput").autocomplete(..... <input id="myinput"/> <ul id="autocomplete"></ul> <div>Loads of other content</div> <div>Loads of other content</div> <div>Loads of other content</div> </body> ``` In 1.8.6 ``` $("#myinput").autocomplete(..... <input id="myinput"/> <div>Loads of other content</div> <div>Loads of other content</div> <div>Loads of other content</div> <ul id="autocomplete"></ul> </body> ``` So my question is, is there a way to make the autocomplete append after my given selector rather than appending to the body?

Original source