I am attempting to implement the jquery UI Autocomplete feature and I am having all sorts of troubles. I originally got a “autcomplete not a function” error, but moving all of my script references into the bottom of the body made that error go away (for unknown reason). Now the autocomplete is simply not working and I’m not getting any more errors. I originally was using my own code but since it didn’t work I swapped over to an example just to get things going.
Here is the Javascript:
<script type="text/javascript" src="jquery-1.6.1.min.js"></script>
<script src="content/js/custom/jquery.ui.core.min.js"></script>
<script src="content/js/custom/jquery.ui.widget.min.js"></script>
<script src="content/js/custom/jquery.ui.position.min.js"></script>
<script src="content/js/custom/jquery.ui.autocomplete.min.js"></script>
<script>
$(function() {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$( "#auto" ).autocomplete({
source: availableTags
});
});
</script>
Edit: Finally got the html to show up. Here is the input field
<input type="text" id="auto" name="auto"/>
I have checked all of the imports and as far as I can tell, they all can be found and I have all the dependencies. I’m running this on Mozilla Firefox 5.0 in Windows XP.
Thanks in advance for the help!
Can you try this way.I have done like this: