I want to set Jquery UI plugin to search only from the beginning of the string. I find some simillar questions but no usable answer. I have this code:
$.ajax({ url: "{!$basePath}/mesta.xml", dataType: "xml", success: function( xmlResponse ) { var data = $( "city", xmlResponse ).map(function() { return { value: $( "name", this ).text(), id: $( "name", this ).text() }; }).get(); $( ".autocomplete" ).autocomplete({ source: data, minLength: 0 }); } }); Thank you.