Why am I getting this JS error?

后端 未结 4 1989
无人及你
无人及你 2020-12-11 04:13

I get this JS error:

jquery-1.5.1.min.js:16Uncaught TypeError: Cannot set property \'_renderItem\' of undefined
d.d.extend._Deferred.f.resolveWithjquery-1.5.         


        
4条回答
  •  孤街浪徒
    2020-12-11 04:39

    I think .data("autocomplete") isn't returning an object, as the error says:

    Cannot set property '_renderItem' of undefined

    If you are doing this:

    $('.foo').data("autocomplete")._render...;
    

    You try breaking it up:

    $('.foo').data("autocomplete");
    $('.foo')._renderItem = ...;
    

    I've never encountered _renderItem, so I'll look more in to that.


    Actually, this question seems to explain a problem really similar to your's: Using _renderItem kind of breaks autocomplete field

提交回复
热议问题