Clear text box after autocomplete
I'm trying to clear the text box after the select event has fired. The following code does not work:
- $("#conditions").autocomplete({
- source: availableTags,
- minLength: 2,
- select: function(event, ui){ $('#conditionList').append("<li>" + ui.item.value + " <a href='#'>[Remove]</a></li>" );
- $('input#conditions').val(""); // <- This does nothing
-
- }
- });
Any ideas on how to get this to work?
Thanks,
David