Error: cannot call methods for autocomplete before initialization; tried to call the destroy method

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

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

cannot call methods for autocomplete before initialization; tried to call the destroy method

+4
source share
2 answers

I got an answer to this in initializing an autocomplete widget ... just add

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

, 1.10. *.Jquery , .

+11

, , , CSS , .

if ($target.hasClass('ui-autocomplete')) {
    $target.autocomplete('destroy')
}
0

Source: https://habr.com/ru/post/1525187/


All Articles