How can you set a limit on the result from the jQuery autocomplete?
This is my code:
$.ajax({
url: \"/cache/search/SearchModels.x
This is what I did based on some reading of the autocomplete API docs
$input.autocomplete({
source: function( request, response ) {
$.getJSON('search.php', request, function( data, status, xhr ) {
// return a max of 10 results.
response( data.slice(0, 9) );
});
}
})
Following this pattern saves having to do any funky stuff in the render layer.