commadelimited/autoComplete.js — pull request #31 by panrafal (2012-07-30 07:01:52+00:00)
Title: A set of changes to make it way more flexible

- it's possible to pass an object as settings.source. This object will be used as $.ajax() options. If you set settings.source.callback - the callback(text, ajaxOptions) will be called allowing to further modify the ajax options
```js

source:{
callback : function(text, ajax) {
ajax.url = '/' + App.language + '/search.json';
if (App.map.getZoom() > 3) ajax.data.bounds = App.map.getBounds().toBBoxString();
}
}
cache : true, // will set cache option to true
```
- don't query again if the text didn't change
- an option to query server not quicker, then specified interval (settings.interval)
- buildItems callback for building the result (settings.builder)
```js

builder : function(data, settings) {
var s = [];
// ...
return s;
}
```
- on desktop, it's possible to select results using up/down/enter keys
- configurable term parameter name (settings.termParam)
- configurable loading placeholder (settings.loadingHtml), which shows up despite the settings.cancelRequests option