I have this select element
<select class="zip_plus_master" data-stype='proof'></select>
The values are loaded from a database, where the ID’s of these values is the value of the attribute “data-zipid” for all options. An example option is like this:
<option data-zipid='34'>95628-1092</option>
How can I have an option with a certain data-zipid attribute value selected?
After parsing, the value of “data-zipid” for all options is currentJSONset.value
I’ve tried this:
$('.zip_plus_master[data-stype=proof] option:selected').attr('data-zipid', currentJSONset.value);
To select the option with
data-zipid="34":