i've created a JQuery UI Autocomplete in which the source is an array of label-value pairs. i need to set the default selected item. i found a way to do that using the desired label, but how can i do that if i have the VALUE instead of the LABEL?
code for setting default value using label string :
$("myAutoCom").autocomplete("search", "someLabel");
var menu = $("myAutoCom").autocomplete("widget");
$(menu[0].children[0]).click();
i have the value,not the label. how can i set selected item depending on value? thanks in advance