jQuery: event that tracks click in browser autocomplete

Posted by Fernando on Stack Overflow See other posts from Stack Overflow or by Fernando
Published on 2011-01-13T13:58:07Z Indexed on 2011/01/13 15:53 UTC
Read the original article Hit count: 213

Filed under:

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 )?

© Stack Overflow or respective owner

Related posts about jQuery