错误:不能调用到初始化之前自动完成的方法;试图调用方法'破坏' [英] Error: cannot call methods on autocomplete prior to initialization; attempted to call method 'destroy'

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

问题描述

我使用ajax-solr.It工作正常使用jQuery-UI-1.8。的。但是当我将它升级到jQuery的1.10。的。它给了我这个异常不能叫上初始化之前自动完成的方法;试图调用方法'破坏'

i am using ajax-solr.It works fine with jquery-ui-1.8.. but when i upgrade it to jquery-1.10.. it gives me this exception 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增加了错误消息的功能,使用不正确的初始化,而它不存在于previous版本。

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天全站免登陆