Closed luiscarlostic closed 10 years ago
How does your init/setup look like?
Just like this:
var data = [
{value : 21, name : "Mick"},
{value : 43, name : "Johnny"},
{value : 46, name : "Richard"},
{value : 54, name : "Kelly"},
{value : 55, name : "Rudy"},
{value : 79, name : "Michael"}
];
var options = {
selectedItemProp : "name",
searchObjProps : "name",
fadeOut : 'slow',
retrieveLimit : 3,
selectionLimit : 1,
canGenerateNewSelections :false,
startText : 'Buscar',
emptyText : '<strong>{0}</strong> no arrojó resultados.',
limitText : 'No se permiten mas selecciones',
showResultListWhenNoMatch : true
};
$("#myinput").autoSuggest(data, options);
Please have a look at this, I've added a sample for this: da8a57f1948ca139401656b83fb59352b7750727
Ty for the sample, help too much.
Ok I finally make it work, I was selecting in a wrong way my input. This is my code.
var input = $('.as-selections').find('input[type=text]');
input.autoSuggest('add', {value : "55", name : "Rudy Hamilton"});
Hello, how can add a item with your methods
add Arguments: data or array of data Example 1:
Example 2:
I try this and nothing happen. Can you help me please.