I have the following code:
$("#chkbx_first").change(function () {
if ($(this).attr("checked")) {
alert("Check Box Selected"); //do something when checked
} else {
alert("Check Box Unselected"); //do something when cleared
}
The problem is that despite on the checkbox stste the second allert appears all the time - "Check Box Unselected". Why the first alert doesn't appear ?
Is there another approaches to track the CHECK event? Thanx.