If I understand
The following code is working in Firefox 4.0b9
Code:
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.1.js"></script>
</head>
<body>
<input type="checkbox" class="todoGA">
<input type="checkbox" class="todoGA">
<input type="checkbox" class="todoGA">
<input type="checkbox" class="todoGA">
<input type="checkbox" class="todoGA">
<input type="checkbox" class="todoGA">
<br><br>
Toggle Checkboxes: <input type="checkbox" id="todoSelectAll" >
<script type="text/javascript">
$('#todoSelectAll').on('click', function() {
$('.todoGA').attr('checked', $(this).is(':checked'));
});
</script>
</body>
</html>
Code:
$('#todoSelectAll').on('click', function() {
var t = $('.todoGA');
for(var i=0; i<t.length; i++) {
$(t[i]).attr('checked', !$(t[i]).is(':checked'))
}
});
Code:
$('#todoSelectAll').on('click', function() {
$('.todoGA').each(function() (
$(this).attr('checked', !$(this).is(':checked'))
));
});
Bookmarks