I realize there are a lot of posts regarding this issue, but nothing has helped me so far.
I am putting together a Django website, and i need a form with a searchable field, that is, a standard text input, that uses the given text to filter a drop-down list of options.
This feature is exactly like what is presented at the JQuery website: http://jqueryui.com/demos/autocomplete/
I just cannot seem to make it work. Below is my code:
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script type="text/javascript">
$(function() {
var availableTags = [
{ label: "Mosek ApS, Ruben Nielsen", value: "8" }
];
$( "#tags" ).autocomplete({
source: availableTags
});
});
</script>
</head>
<body>
<input id="tags">
</body>
to my eye, this is completely like the example code at the JQuery site referenced above. The input box shows, but no drop-down menu appears, when i start typing the text of the label (label: “Mosek ApS, Ruben Nielsen”)…
Any help..?!
You need to include
jQuery UI(which is a separate library to plain jQuery) javascript and CSS: