I have a piece of jquery which is working fine on firefox and ie but not working in chrome and safari
here it is
if (intCurrPortionId == intOldPortionId) {
$('#' + portionCell + '').css("backgroundColor", "green");
} else {
$('#' + portionCell + '').css("backgroundColor", "red");
}
and this is not working.. m calling this jquery on checkbox onchange event
EDIT: It is not executing the function in chrome and safari.. i added the alert in the code and found out that no alerts were popping... now how to tackle it
$('#' + portionCell).css("background-color", "green");
ReplyDeleteTry using background-color:
ReplyDeleteif (intCurrPortionId == intOldPortionId) {
$('#' + portionCell + '').css("background-color", "green");
} else {
$('#' + portionCell + '').css("background-color", "red");
}
FYI, using javascript style parameter names (like backgroundColor) works fine for me here in Safari 5.1.2 and Chrome 16:
Test fiddle