I have two select box in a modal Boostrap:
<select name="event_status" id="event_status" class="form-control mb-1" required>
<option value="in progress">in progress</option>
<option value="ended">ended</option>
</select>
<select name="event_picto" id="event_picto" class="form-control mb-1" required>
<option value="" disabled selected>traffic status...</option>
<option value="img/eventgreen.svg">normal</option>
<option value="img/eventyellow.svg">under conditions</option>
<option value="img/eventred.svg">closed</option>
</select>
i would like that if option value "ended" is selected so option value of second select box is set to "normal".
i try this but no change :
$("#event_status").change(function() {
var val = $(this).val();
if (val == "ended") {
$("event_picto").html("<option value='img/eventgreen.svg'>normal</option>");
}
}