I am trying to update the label of a radio button when it is clicked, but I have been unsuccessful so far. I came across this answer which seemed promising, but it did not work for me. Here is my code:
HTML
<div class="same-line">
<input type="checkbox" name="417-jornadas-de-g%c3%a9nero-sin-fecha-confirmada" value="Sí" class="checkbox">
<label class="checkbox">
Jornadas de género (sin fecha confirmada)</label>
<div class="clear-form"></div>
</div>
<div class="same-line">
<input type="checkbox" name="417-curso-de-fotograf%c3%ada-sin-fecha-confirmada" value="Sí" class="checkbox">
<label class="checkbox">
Curso de fotografía (sin fecha confirmada)</label>
<div class="clear-form"></div>
</div>
CSS
.same-line input[type='radio'] {
display:none;
}
.same-line label[class='checkbox'] {
display:inline-block;
font-size: 12.2pt;
}
.same-line input[type='radio']:checked + label[class='checkbox'] {
background-color: #FFBF00 !important;
}
Looking for any insights or suggestions!