I have a gender selector, and a script that gets the value of the selected gender and pastes it on a label, but its pasting the value: "M" or "F".
<div name="userLabelDiv" id="genderUserLabelDiv">
<label class="required">Sexo</label>
<label id="genderLabel">F</label>
</div>
Now when Im trying to get this letter and replace for the actual gender, I'm missing on the js script. Could you help me?
$("#genderLabel").html(
if($(this).value='F'){
this.value='Female';
}
if($(this).value='M'){
this.value='Male';
}
);
I know the script is probably wrong, could someone correct it please? Thank you!