jquery ui autocomplete with a delegate


I have set up JQuery UI autocomplete according to the docs and it works for any input with class="tag-item" that is rendered to the page. However the user can add inputs into the dom via JS so I need a way to bind autocomplete to the new dynamically created inputs using delegate. I am not sure how to set this up, any ideas would be appreciated.


You could delegate with a 'focusin' event to setup your input field.

See this post