wuyuntao / jquery-autosuggest

A fork of AutoSuggest jQuery plugin writtern by Drew Wilson.
http://github.com/wuyuntao/jquery-autosuggest
118 stars 59 forks source link

Placeholder attribute support #3

Closed jmikola closed 14 years ago

jmikola commented 14 years ago

This is more of a new feature than bug fix, but I had issues of getting autoSuggest to fit in with forms that were using placeholder attributes in other fields. The startText option for autoSuggest follows its own rendering, and the plugin likes to set the field's value directly (modern plugins have alternative solutions).

This patch adds a usePlaceholder option, which can be used to turn off the existing behavior and simply set the "placeholder" attribute when autoSuggest loads, allowing another plugin (or the native browser) to handle things.

wuyuntao commented 14 years ago

This looks nice. Just commited. Thanks :)