Created
July 1, 2011 13:23
-
-
Save shreyas-satish/1058535 to your computer and use it in GitHub Desktop.
jQuery event fire when all boxes are checked
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have a table. 1st column is a column for checkboxes and 2nd column is normal data. | |
When I check a check a single box I get an alert due to the following function which is as expected. | |
//To catch events when check boxes are checked. | |
$('input:checkbox').live('change', function() { | |
alert("Checked!"); | |
}); | |
But when I check all checkboxes using the command below, I don't get the alert from the function above. | |
//This checks all the checkboxes | |
$('input:checkbox').attr('checked', true); | |
Where am I going wrong? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment