I have following code to show or hide some labels depending if a radiobutton is selected as yes or no.
$('input[name="blabla"]').change(function(){
if($(this).val() == 'Yes'){
$('.jawelk_1').show();
$('.alg_rsvcode_1').show();
}
else{
$('.jawelk_1').hide();
$('.jawelk_1').val("");
$('.alg_rsvcode_1').hide();
$('.alg_rsvcode_1').val("");
}
});
How can I add another option to if($(this).val() == 'Yes')?
I tried if($(this).val() == 'Yes', 'Ja') and if($(this).val() == ('Yes','Ja'), and some other variations but none seem to work. Any suggestions?
Try the or operator
||–https://developer.mozilla.org/en/JavaScript/Reference/Operators/Logical_Operators