Reputation: 135
I got a problem concerning query autocomplete. I read so many posts about this issue, but all suggestions I tried are so far not working.
This is my website http://www.lactoscanner.com and I can see that autocomplete is undefined.
TypeError: undefined is not a function (evaluating 'jQuery("#searchfield").autocomplete({ source:'handlesearch.php', minLength:1
For me it seems that I just miss something. I actually don't load any extra js files which could mess up something. So I wonder why it's not working.
Thanks for your help!
Upvotes: 0
Views: 107
Reputation: 1298
Like @PeterKA said, you're loading two instances of jquery. I'd eliminate one of the instances of jquery if you could. Then make sure all jquery plugins are still called after jquery is loaded. Right now you're attaching your plugins to one instance of jquery, but then loading a second instance.
Upvotes: 1
Reputation: 24648
Since you're using multiple versions of jQuery -- 1.9.1 and 1.8.0 -- then change your code to:
jQuery(document).ready(function( $ ){
$("#searchfield").autocomplete({
source:'handlesearch.php',
minLength:1
});
})
Upvotes: 1