I have a little problem for this to work.
The server answers with the correct json request, however typeahead only displays the first letter of my returned result. For example, if I find k, it will display:
to
to
K
k
Could you help me understand 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 am using the following code
https://gist.github.com/1866577
Thanks.
source share