質問

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.

役に立ちましたか?

解決

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

Like this:

console.log(item.text());
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top