horsey(input, {
suggestions: ['banana', 'apple', 'orange']
});
horsey(input, {
suggestions: function (done) {
setTimeout(function () {
done(['banana', 'apple', 'orange']);
}, 2000);
}
});
horsey(input, {
suggestions: [
{ value: 'banana', text: 'Bananas from Amazon Rainforest' },
{ value: 'apple', text: 'Red apples from New Zealand' },
{ value: 'orange', text: 'Oranges from Moscow' },
{ value: 'lemon', text: 'Juicy lemons from Amalfitan Coast' }
]
});
horsey(input, {
suggestions: [
{ value: 'banana', text: 'Bananas from Amazon Rainforest' },
{ value: 'apple', text: 'Red apples from New Zealand' },
{ value: 'orange', text: 'Oranges from Moscow' },
{ value: 'lemon', text: 'Juicy lemons from Amalfitan Coast' }
],
render: function (li, suggestion) {
var image = '<img class="autofruit" src="img/fruits/' + suggestion.value + '.png" /> ';
li.innerHTML = image + suggestion.text;
}
});