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

attachTo option should attach the suggestion list into not after the giv... #14

Closed ImanMh closed 10 years ago

ImanMh commented 10 years ago

I wish attatchTo would append my suggestion list to instead of after the dom element passed in.

...en DOM element

issa-tseng commented 10 years ago

Thanks for the pull request! I certainly see the desire for this behaviour, but I'd rather see it implemented as an option passed into the plugin, with the original behaviour remaining the default for backwards compatibility. This would certainly break my own application if I merged it as-is, and I'm sure others' as well.

ImanMh commented 10 years ago

here is the option version, please review these modifications.

issa-tseng commented 10 years ago

Great! Last change would be to use 4-space tabs to match the rest of the file. You might also consider moving the .addClass() to after the if block so that all the attr modifications just chain in a row.

ImanMh commented 10 years ago

sure, I just made those changes.

issa-tseng commented 10 years ago

Awesome. Thanks!