I’m trying to use the jQuery autocomplete plugin. I have an array of IDs that I want to plugin to work on. So, say I have:
var aIds = ["1", "2"];
The examples I see on how to use the plugin looks like this:
$('#1').autocomplete
Is there a way for me to use this autocomplete plugin and my array of ids? The array of ids are coming from a web service.
Also, the autocomplete plugin exposes certain events like select (see: http://docs.jquery.com/UI/Autocomplete#event-select). When that happens, how can I tell which element triggered the event (if I am assigning the array of ids dynamically)?
If you want to make a selector: