How to use the 'scroll' and 'max' options in Autocomplete


I need help with aucomplete of the jquery.

jQuery("#PeopleName").autocomplete(
                                   {source:["name1","name2","..."],
                                    minLength:2,
                                    max:10,
                                    scroll:true});

The 'scroll' and 'max' are not working.
I am use jquery-ui-1.8.18.custom.min.js. What is wrong with this code?


Answers:


I managed to solve this problem. I found the code in 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>

This is working.