Ich brauche hilfe bei aucomplete der jquery.
jQuery("#PeopleName").autocomplete(
{source:["name1","name2","..."],
minLength:2,
max:10,
scroll:true});
"Blättern" und "Max" funktionieren nicht.
Ich verwende jquery-ui-1.8.18.custom.min.js. Was stimmt nicht mit diesem Code?
Antworten:
50 für die Antwort № 1Ich habe dieses Problem gelöst. Ich habe den Code in gefunden jqueryUI
<style>
.ui-autocomplete {
max-height: 200px;
overflow-y: auto;
/* prevent horizontal scrollbar */
overflow-x: hidden;
/* add padding to account for vertical scrollbar */
padding-right: 20px;
}
</style>
<script>
jQuery("#PeopleName").autocomplete({
source:["name1","name2","..."],
minLength:2
});
</script>
Das funktioniert.