horse(document.querySelector('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 the rich Amalfitan Coast' }
],
onselect: function(input_dom, selected_li, suggestion) {
alert("you select " + suggestion['text']);
}
});
horsey(document.querySelector('input'), {
suggestions: [
{ value: 'banana', text: 'Bananas from Amazon Rainforest' },
{ value: 'banana-boat', text: 'Banana Boat' },
{ value: 'apple', text: 'Red apples from New Zealand' },
{ value: 'apple-cider', text: 'Red apple cider beer' },
{ value: 'orange', text: 'Oranges from Moscow' },
{ value: 'orange-vodka', text: 'Classic orange vodka cocktail' },
{ value: 'lemon', text: 'Juicy lemons from Amalfitan Coast' }
],
limit: 2
});