Question

how can i access the selected item in pui-autocomplete, load of array is working but on select i am not able to use 'item' since i dont know how to use the selected item my array contains strings...

     $('#basic').puiautocomplete({  
        effect: 'fade',
        effectSpeed: 'fast',
        forceSelection: false,
        delay: 100,
        completeSource: references,
       select: function(event, item) {
         console.log(item); // getting this response: jQuery.fn.jQuery.init[1]
       }

    });  

typeof(item) is object not string. So how can i use the value of my selected item. Thaks for help.

Was it helpful?

Solution

If you want to access the value of the item use item.text()

Like this:

console.log(item.text());
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top