Jquery UI autocomplete event change

后端 未结 2 681
眼角桃花
眼角桃花 2021-01-03 08:20

Hi I got a problem with change event. By documntation there should be object ui.item

After an item was selected; ui.item refers to the selected item.

2条回答
  •  悲&欢浪女
    2021-01-03 08:51

    if ui.item is not defined that means your json source is not well formed. You have to send a json source like this:

    [{"label":"Jean","value":1},{"label":"carl","value":2}]
    

    You can add more key to the array but at least you have to set "label" and "value". Check the json string. Also I reckon you to use the last version of autocomplete 1.8.1 at the moment

提交回复
热议问题