I have a small script problem with jQuery. I tried to make a form with 2 radio buttons and a select list. I want that if the user clicks on the list it would check the "email" and the radio should get checked if the user click on the radio "livredor", I need to make it "autochecked".
This code only works once. If the radio buttons get clicked it's stuck.
$("#destinataires").change(function() {
$('input[type=radio][name=choix][value=email]').attr('checked', true);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<INPUT id="emailchoix" name="choix" type="radio" value="email">
<SELECT id="destinataires" name="contact" size="1">
<option value="etienne">Étienne</option>
<option value="michele">Michèle</option>
<option value="thomas">Thomas</option>
<option value="filou">Filou</option>
<option value="mustapha">Mustapha</option>
</SELECT>
<INPUT id="livrechoix" type="radio" name="choix" value="livredor"> Livredor