Dont know how to sort results in autocomplete jquery!
Aloha! I use autocomplete jquery plugin to suggest input on the page, suggest search on array with string elements. I use this settings for autocomplete:

    $("#colorsearch").autocomplete(data, {
    		matchContains: true,
    		autoFill:false});
    	});	
So...when i start input what i`m looking for, for example 'dave' the results are:
'ravedave', 'sadave','dave' (because it have the same order in data array) and so on....i need that first elements of result list have substring ('dave') at the beginning, like this: 'dave' etc...
I used sort function with custom sorting functions. But it work only outside autocomplete. I need do this inside this plugin. Who knows?

 
Dont know how to sort results in autocomplete jquery!
===

Aloha! I use autocomplete jquery plugin to suggest input on the page, suggest search on array with string elements. I use this settings for autocomplete:

    $("#colorsearch").autocomplete(data, {
    		matchContains: true,
    		autoFill:false});
    	});	
So...when i start input what i`m looking for, for example 'dave' the results are:
'ravedave', 'sadave','dave' (because it have the same order in data array) and so on....i need that first elements of result list have substring ('dave') at the beginning, like this: 'dave' etc...
I used sort function with custom sorting functions. But it work only outside autocomplete. I need do this inside this plugin. Who knows?

 