This if block:
count = 1;
if (count == 4) {
alert(count);
$(":checkbox").attr("disabled", true);
count = 0;
}
is not running. I have also added an alert() but its not appearing. My javascript code also contains some jQuery. How to solve it?
In your current code, you’re always setting
countto1before checking whether it is4. It will never be4, it will always be1.