issa-tseng / awesomecomplete

A lightweight autocomplete plugin for jQuery. Autocomplete that doesn't suck — I think.
http://dontexplain.com/2009/08/jquery-plugin-lautocomplete/
52 stars 7 forks source link

[Feature request] Callback when li.active class is toggled. #9

Closed t1mmen closed 12 years ago

t1mmen commented 12 years ago

I'm trying to add a tooltip style bubble on li.active if it has focus for longer than 150ms.

Maybe this is already possible?

Thanks for a fantastic plugin, it's doing so many things so right!

issa-tseng commented 12 years ago

Hi t1mmem, sorry for the late response, I've been out of the country for a bit.

You could take one of two approaches here:

  1. You could modify the plugin to fire an event when an li becomes active. Your bubble triggerer could listen for this event and behave accordingly. I'd be happy to accept that as a pull request (or I could even do it myself) if you end up going this route.
  2. You could just check which item is selected ever 150ms. This sucks because you have to run code 8 times a second, but then you don't have to modify the plugin.
issa-tseng commented 12 years ago

Closing due to inactivity. Feel free to reopen if you have further questions.