2

iOS API has a beautiful feature which allows a developer to load data lazily in a UITableView (which used along with UISearchBar, can be used as autocomplete) when a user scrolls down. Can something similar be achieved with jQuery for autocomplete? Such that when user makes a query for say letter "a", the suggestions should be populated with first x number visible results and when the user scrolls down, the view is populated with next x results?

PS : I tried attaching the scroll event on the results container of jQuery UI autocomplete, but I couldn't map the amount of scroll to number of results.

asked Jun 13, 2011 at 4:33

1 Answer 1

1

jQuery autocomplete has no built in options for doing this, so you'd have to do some plugin hacking to get it working. You might for example check whether the last item is visible to determine whether to load the next set of data.

Alternatively, you could try a plugin like Flexbox which might be more amenable to what you're trying to do. Flexbox comes with a built in paging feature.

answered Jun 13, 2011 at 4:52
Sign up to request clarification or add additional context in comments.

2 Comments

Great suggestion! Will see if that fits in :)
Correct me if I'm wrong but it seems that flexbox pages already available set of results. i.e. it would not allow me to fetch each page's results separately. Is this correct? or I'm missing something?

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.