What is a good way to change the value of a Selectric drop down programmatically based on name? I know the value of the option I want to set as selected. I don't know the name or the index.
Here is my best attempt:
$('.store-availability').prop('selectedIndex', 3).selectric('refresh').change();
Since I don't know the index I would have to jQuery.Index() on the options first to find it or something like that. Is there a cleaner approach?