jQuery: event that tracks click in browser autocomplete
- by Fernando
I have a keyup event on an input. This event works fine for auto complete when you select a value and press enter. But it doesn't work when you click at an auto complete value.
Is there an event that i can use in such case?
I already tried the change one but it doesn't work.
Thanks!
Edit:
Maybe i was not clear but i am referring to the autocomplete feature that browsers have. I am not trying to build my own.
Example: I have the following event:
$('.product').keyup(searchByProduct);
When user clicks at this input the old values that he already typed shows up ( it's the browser that does this ). If he clicks on one of the values, the function searchByProduct is not called.
Which event do i have to register to track this click ( and that the input content has changed )?