switch (Valid) {
case 'yes':
$(".highlight").html('<img src="img/validgreen.png"/>');
break;
case 'no':
$(".highlight").html('<img src="img/expiredRed.png"/>');
break;
default:
$(".highlight").html('N/A');
}
I have also used if , if/else statement. I get the same result.