jquery autocomplete with json response

前端 未结 3 936
囚心锁ツ
囚心锁ツ 2020-12-02 16:02

im getting response in json, but this wont parse the json response. what m i doing wrong? i could\'nt find anything on doc http://docs.jquery.com/Plugins/Autocomplete

<
3条回答
  •  执笔经年
    2020-12-02 16:53

    I think you just need to throw in a dataType option, I remember readying that you can use any of $.ajax's options in the autocompleter:

    $("#users-allowed").autocomplete("/people/following.json", {
        dataType: "json",
        ...
    

提交回复
热议问题