jQuery Autocomplete .data(“autocomplete”) is undefined

前端 未结 6 1450
盖世英雄少女心
盖世英雄少女心 2021-02-03 20:58

When I try to implement auto-complete using the code below I get an error stating:

.data(\"autocomplete\") is undefined

How ever if I remove th

6条回答
  •  余生分开走
    2021-02-03 21:33

    You can implement the below mentioned line

    .autocomplete( "instance" )._renderItem = function( ul, item ) {

    instate of

    .data("autocomplete")._renderItem = function (ul, item) {

    as per the documentation available at Jquery site Jquery AutoComplete Documentation and example you will find this code.

    from upgraded version of jquery 1.10 they have made change in code. hope this will help you.

提交回复
热议问题