$("input:checked[name=answer]").change(function(){ if($(this).val() == "yes"){ $(".disp").css("color","red"); }; });