Clear text box after autocomplete

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:

  1. $("#conditions").autocomplete({
  2.             source: availableTags,
  3.             minLength: 2,
  4.             select:  function(event, ui){ $('#conditionList').append("<li>" + ui.item.value + " <a href='#'>[Remove]</a></li>" );
  5.                     $('input#conditions').val(""); // <- This does nothing
  6.                 
  7.                 }
  8.  });

Any ideas on how to get this to work?

Thanks,

David