I’m having a little issue getting this to work.
The server responses with the correct json request however typeahead only displays the first letter of my returned result. For example if I type k it will display:
k
k
K
k
Could you help me figure out why?
Here is my js
$('.user').typeahead({
source : function(typeahead, query) {
return $.post('getUser', {
query : query
}, function(data) {
return typeahead.process(data);
});
}
});
and my html
<input autocomplete="off" type="text" size="16" id="appendedInputButton" class="user" data-provide="typeahead">
I’m using the following code
https://gist.github.com/1866577
Thank you.
If the server is responding with an array of objects with attribute ‘contact’, try this: