Autocomplete change event

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.

  1. $("input, textarea").change(function() {   
  2.     var id = $$(this).attr('id');
  3.     var value = $$(this).val();
  4.     // ...
  5. });
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.

    • Topic Participants

    • steve