Is it possible to fire option click programmatically with pure Javascript?
HTML:
<select id="racetype" class="select-menu" name="race-type"> <option value="value" class="select-option js-select-option racetype-all" data-filter-value=".js-find-race-item">Race Types</option> <option value="value" class="select-option js-select-option racetype-sprint" data-filter-value=".js-type-sprint">Sprint</option> <option value="value" class="select-option js-select-option racetype-super" data-filter-value=".js-type-super">Super</option> <option value="value" class="select-option js-select-option racetype-beast" data-filter-value=".js-type-beast">Beast</option> </select> <a href="javascript:void(0)" onclick="SOsprint();">Click to select the second option (Sprint)</a> JAVASCRIPT:
function SOsprint() { var select = document.getElementById("racetype"); select.selectedIndex = 1; return false; }