Autocomplete with Next / Previous button
I am creating an autocomplete textbox for a jquery autostart touchscreen device app . The scrollbar in autocomplete is not that user-friendly so I had to give another option. Can I enable Next / Prev button inside Autocomplete? or is there any other good option for this problem?
Gita.
a source to share
As far as I know, there is no easy way to do swap in jquery autocomplete. Since you don't want to show the scrollbar, you can specify the max
and properties scrollHeight
to display enough options without the scrollbar. Here max
is the maximum number of results it will show.
$("div.autocomplete").autocomplete('results.aspx',{
max:10;
scrollHeight:250
});
If you are desperate for paging why not use Jquery FlexBox . In Flexbox, you can implement paging very easily.
$('div.autocomplete').flexbox('results.aspx', {
showArrow: false
paging: {
pageSize: 10
}
});
As Flexbox shows the arrow sign to the right of the input field by default, you need to set showArrow
to false
to remove it and make it look like an autocomplete rather than a combobox. This pageSize
indicates the maximum number of results per page.
a source to share