jqueryui autocomplete: lists entries with search terms in middle

Posted by Akshey on Stack Overflow See other posts from Stack Overflow or by Akshey
Published on 2010-03-31T13:19:29Z Indexed on 2010/03/31 13:23 UTC
Read the original article Hit count: 405

Filed under:
|
|

Hi,

I am using jqueryui autocomplete widget for autocompleting a 'country' field but I am facing an issue. Suppose the user enters "in", I want the jqueryui to list countries like 'india', 'indonesia' which start with 'in', but it also lists the countries which have 'in' somewhere in the name (like: argentina). How can I solve this issue?

jQuery(".autocomplete").autocomplete({
    source: CountrySuggestions, //CountrySuggestions is an array in javascript containing the list of countries
    minLength: 2
});

Akshey

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about autocomplete