Uncheck all checkboxes
Uncheck all checkboxes
Hope someone can help. I currently have a check all checkboxes link on my page. Maybe I am being dense but I would like to add a link to uncheck all checkboxes, how do I go about doing this. Here is the code I have for checking all checkboxes: How would I clear all checkboxes using the second Clear All onclick event.
//Check all checkboxes
$('#form').click( function() {
$('input', oTable.fnGetNodes()).attr('checked','checked');
return false; // to avoid refreshing the page
} );
HTML form:
Check All
Clear All
//Check all checkboxes
$('#form').click( function() {
$('input', oTable.fnGetNodes()).attr('checked','checked');
return false; // to avoid refreshing the page
} );
HTML form:
Check All
Clear All
This discussion has been closed.
Replies
$('#form span.button:eq(1) a').click( function () {
table.$('input').removeAttr( 'checked' );
} );
[/code]
Allan
$('span.button:eq(1)').bind('click', function() {
oTable.$('input').removeAttr( 'checked' );
return false;
});