I would like to set the value 'Saumon' of the following select as default value with jquery if condition is met. I know how to deal with conditions but really don't find a solution to this issue :
<div class="form-group" style="display: block;">
<label class="control-label col-sm-2">Sandwiches 1</label>
<div class="col-sm-10">
<select id="ordersdetailpartyloafsandwich1ID" name="child-partyloafsandwich1ID" class="form-control select2 select2-hidden-accessible" tabindex="-1" aria-hidden="true">
<option value=""></option>
<option value="1">Saumon</option>
</select>
<span class="select2 select2-container select2-container--default select2-container--below select2-container--focus" dir="ltr" style="width: 100px;">
<span class="selection">
<span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-labelledby="select2-ordersdetailpartyloafsandwich1ID-container">
<span class="select2-selection__rendered" id="select2-ordersdetailpartyloafsandwich1ID-container" title="Saumon">Saumon</span>
<span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>
</span>
</span>
<span class="dropdown-wrapper" aria-hidden="true"></span>
</span>
</div>
I have tried this :
https://jsfiddle.net/marcq/rL4nuhv6/1/
but the value is of course set outside the select box.
I'm stuck and would appreciate some expertise here since I don't want to alter the source code of my app. Thanks. Marc