I am currently trying to create an autocomplete with a source that is stored in a javascript variable but this variable can be updated by another function. So, what I would like
this is very straight forward
$( "#tags" ).autocomplete('option', 'source', availableTags)
setting availableTags array wherever needed