When initializing the list, I automatically set the required list item as selected, but sometimes the wrong one is selected. That's the salt ...
When I have on the list: 'orange' , 'banana', 'apple', 'strawberry)' Everything is ok. I ask:
$('.edit_selectCategory option:contains("' + "апельсин" +'")').prop('selected', true); And all the buzz getting 'orange'. But as soon as several similar words appear in the list, the last one is selected. Ie if there is still an orange orange in the list, then I will get an orange orange and not an orange .
<select class="edit_selectCategory" style="width: 100%"></select>