Notes on the Bassistance jQuery Autocomplete plugin
This plugin has some key features we employ, that I’ve yet to find in others, so we’ve stuck with it. But, it also has some bugs or idiosyncrasies that have made it quite frustrating at times. These notes are now my catalog of these issues.
Some of the reasons we’re using this plugin vs. others:
- returned results can contain HTML to affect a style
- returned results can include data, not just the matching text to put in the field. This allows us to match an item, and then inject other data that we need into the DOM. For example, matching a city, it lets us store the city’s ID, its state, and country, in hidden form fields, so that we can send that data to a third party site if needed (e.g. metasearch). This reason alone prevents using any other plugin I’ve seen (including the new autocomplete in jQuery UI 1.8).