For the elements with corresponding 'li' that has a selected class, I need to set the selected property only for those specific 'option' elements. The value is determined by the data-input-value attribute in the 'li' and the value attribute in 'option'.
<div class="wrapper">
<select name="name">
<option value="val1">name1</option>
<option value="val2">name2</option>
</select>
<ul data-input-name="name">
<li data-input-value="val1" class="disabled">name1</li>
<li data-input-value="val2" class="enabled selected">name2</li>
</ul>
</div>