Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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'

like image 264
javacreed Avatar asked Feb 04 '14 09:02

javacreed


1 Answers

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

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

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.

like image 151
javacreed Avatar answered Oct 20 '22 03:10

javacreed