How to set limit to jQuery mobile autocomplete to display on 10 results

386 views Asked by At

I am creating an app in which I want to implement the JQM autocomplete. I had created the autocomplete it just the demo before implementing it to project.

What I want to know is how to set the limit that it will show only 10 listview results and not more than that.

Here is a link to the code of the autocomplete.

Any help is appreciated. Thanks in advance.

1

There are 1 answers

6
Rituraj ratan On

slice your result

var result=//your result in array




results.slice(0, 10)); // by this only 10 results come

reference slice