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

Enhance the onComplete callback with the input element. #16

Closed fredrik-w closed 5 years ago

fredrik-w commented 9 years ago

I have a page with multiple input elements that are being enhanced by awesomecomplete. To be able to detect when the value has changed I needed to enhance the onComplete callback. By adding a second parameter carrying the input element I can tell which input field has (possibly) been changed.

issa-tseng commented 5 years ago

no idea if you're still using this, but github should probably email a reminder when a PR's been open for this long. i didn't mean to ignore this, sorry!

i made a slight change: i'm binding $this as this in the onComplete callback rather than passing it as a var, which i feel like makes it a slightly more jQuery-like experience.