my problem is clear.
I'm using jquery autocomplete and i don't know why it shows me only the message:
9 results are available, use up and down arrow keys to navigate.
Without showing me the list of result.
This is my code:
<p class="select-c">
<label for="fcb">Location</label>
<input id="fcb" name="fcb" type="text">
</p>
$("#fcb").autocomplete({
source: function (request, response) {
$.ajax({
type: "GET",
dataType: 'json',
url: "../ws/city/" + request.term,
async: true,
success: function( data ) {
response( $.map( data, function( item,key ) {
return {
label: key,
value: item.id_town+"#"+item.id_province
}
}));
},
error: function (result) {
alert("Due to unexpected errors we were unable to load data");
}
});
},
minLength: 2
});
with results like:
What could be the problem??
.ui-helper-hidden-accessible {
display: none;
}
Check your CSS, maybe you are hiding the menu element. Try with:
.ui-autocomplete {
z-index: 10000000;
}
Just check if you are importing the correct css to correct the list rendering
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
And if you also want to remove the message, add the following entry after source
$("#fcb").autocomplete({
//your source info
messages: {
noResults: '',
results: function() {}
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With