错误:无法在初始化之前调用自动完成方法;试图调用方法“销毁" [英] Error: cannot call methods on autocomplete prior to initialization; attempted to call method 'destroy'

查看:26
本文介绍了错误:无法在初始化之前调用自动完成方法;试图调用方法“销毁"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 ajax-solr.它适用于 jquery-ui-1.8.*.

I am using ajax-solr. It works fine with jquery-ui-1.8.*.

但是当我将它升级到 jquery-1.10.* 时,它给了我这个异常:

But when I upgrade it to jquery-1.10.* it gives me this exception:

不能在初始化之前调用自动完成方法;试图调用方法 'destroy'

cannot call methods on autocomplete prior to initialization; attempted to call method 'destroy'

推荐答案

我在自动完成小部件的初始化中得到了答案...只需添加

I got the answer to it in the initialization of autocomplete widget...just add

$(this.target).find('input').autocomplete();

这将初始化发生这种情况的自动完成小部件,因为在 1.10.* 中.Jquery 添加了错误消息,用于在没有正确初始化的情况下使用函数,而在以前的版本中没有.

This will initialize the autocomplete widget this happened because in 1.10.* .Jquery has added error messages for usage of functions without proper initialization whereas it was not there in previous versions.

这篇关于错误:无法在初始化之前调用自动完成方法;试图调用方法“销毁"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆