开发者

style problem with jQueryUI Autocomplete widget (using remote datasource)

开发者 https://www.devze.com 2022-12-30 01:12 出处:网络
<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

<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 ha开发者_C百科ppen, 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.


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());

0

精彩评论

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

关注公众号