I'm getting source from a remote location using the dataType:'jsonp'
and if i see the developer tool on chrome, I'm getting a response with certain data but the dropdown of the typeahead never appears.
This is the code I'm using:
$(document).ready(function(){
$('#txtMedicamentos').typeahead({
header:'<b>Medicamentos</b>',
template:['<span>{{descripcionMedicamento}}</span>'].join(''),
limit:10,
minLength: 3,
remote:{
url:'http://geofarma.pe/service/GetMedicamentos/%QUERY',
filter: function(parsedResponse){
console.log(parsedResponse);
for (i = 0; i < parsedResponse.length; i++) {
parsedResponse[i].value = parsedResponse[i].descripcionMedicamento;
parsedResponse[i].tokens = new Array(parsedResponse[i].descripcionMedicamento);
}
return parsedResponse;
},
dataType: 'jsonp'
},
engine:Hogan
});
});
The demo : http://jsfiddle.net/XtLrH/