I am using JQuery autocomplete in my application using this code:
$(document).ready(function(){
var data = [{"value":"one"},{"value":"two"}];
$("#company").autocomplete({
source:data,
select: function(e, ui) {
e.preventDefault() // <--- Prevent the value from being inserted.
$(this).val(ui.item.value);
}
});
});
I have a text input with an id of company
I am using jQuery-2.1.3.min.js
stored locally on my server
When I type into the text input, nothing is displaying. In the console, I can see an error on the line:
$(document).ready(function(){
the error is saying:
Uncaught ReferenceError: $ is not defined
What could be causing this issue? I have also tried including jQuery version 1.10.2 and this made no difference