views:

6

answers:

0

I've created my own autocomplete using ajax and I want to be able to monitor the search input as the user types... I'm using TypeWatch right now and the only issue I see is that if the user has backspaced and the input is now empty, my search results sit there.

What would be the best way of extending the TypeWatch function (perhaps adding a second callback) so that when the input it empty, I can remove the search results div?