[jQuery] AutoComplete - how to update the local data array?
I am using the local data array to populate the typeahead list.
After a button on my form is clicked, I want to update local data
array with new values.
If I try to call the original autocomplete function again:
$("#search_query").autocomplete(eval(data), {multiple: true,
multipleSeparator: " "});
It appears to now be running two versions of autocomplete for the same
field and causes some strange behavior.
Is there a proper way to update the local data array? (or a
destructor in jquery for the original autocomplete instance?)
Or am I stuck using the URL parameter for autocomplete? (which I
think may eventually lead to performance issues - because if fires off
on keypress?)
Thanks!
-Adam