tags:

views:

23

answers:

1

<input class="ui-autocomplete-input"/> represents the text field to be autocompleted.

<ul>...</ul> contains the list of matching items from the text field input. It is added to the document by remote call as you type.

<ul>...</ul> is added just inside the closing </body> tag. I was expecting the <ul>...</ul> to be placed just after the <input class="ui-autocomplete-input"/>. Because this does not happen, the <ul>...</ul> falls outside of the containing div and the resulting style is broken.

Suggestions? Can I specify where the <ul>...</ul> gets placed in the document? Thanks in advance for your time.

+1  A: 

Post your source (so we can see exactly what we're working with here) but basically you need just need to find the parent and then appendTo

$("ul").appendTo($("input.ui-autocomplete-input").parent());

Jason
Indeed that's basically it:`$("ul.ui-autocomplete").insertAfter($("input.ui-autocomplete"))`The documentation implies that is what happens by default, but it turns out it is added after the body so it is always on top in IE (which doesn't do z-index).