So I have some markup that looks like this, And some jQuery javascript:
let color_select = $('select#SelectByColor');
color_select.val([]);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<select id="SelectByColor" class='filter-select' name='color'>
<option value="">By color</option>
<option value="Red">Red</option>
<option value="Blue">Blue</option>
<option value="Green" selected="selected">Green</option>
<option value="Yellow">Yellow</option>
</select>
<button id="FilterReset">Reset</button>
That gets invoked when the "Reset" button is clicked. It pretty much works - when you click the reset button. the Select box value gets set to "". BUT.. the visual display of the select box is also set to blank, not "By color". Why is this the case?
In addition, according to the Chrome DevTools, the selected option is still Green.