Autocomplete change event
I'm using the following code to register a handler on change events to all input and textareas on my form. There are many input and textarea elements, so I want to catch change events from all of them in one go, rather than addressing each individually. I need the id and value of each element on change.
- $("input, textarea").change(function() {
- var id = $$(this).attr('id');
- var value = $$(this).val();
- // ...
- });
A number of inputs on the page are Autocomplete, and the above code doesn't respond to changes when the user selects a value from the Autocomplete menu. Any help getting the id and value from the Autocomplete inputs on change would be very much appreciated.