Sorry I couldn\'t find a clear solution on how to do this.
I\'m using jQuery UI autocomplete on a textbox
that retrieves data from a database.
I need to add an \"Ad
I suppose you could add the li
in one of Autocomplete's callbacks, like open
:
$('#venue').autocomplete({
open: function () {
// If it's not already added
if (!$('#ac-add-venue').length) {
// Add it
$('<li id="ac-add-venue"><a href="....">Add venue</a></li>').appendTo('ul.ui-autocomplete');
}
}
});
You may need to change some selectors.
Edit: Btw: there's no way that can be all your code? It's missing several closing }:s for one.