The Blog

DataTables magic! (select all) Posted on

Here it goes, I’m trying to get select all, in a fancy way. Staring Here, I guess I should start here, since it’s already nicely done.
Then little more magic from Allen here, and one should be on their way.

"fnInitComplete" : function () {
$('#check_all').click( function() {
$('input[name*=\'selected\']', oTable.fnGetFilteredNodes()).attr('checked',this.checked);
});
}, 

$('input', tab.fnGetFilteredNodes()).attr('checked','checked');

$('#check_all').click( function() {
$('input', oTable.fnGetFilteredNodes()).attr('checked','checked');
return false; // to avoid refreshing the page
});

$('#check_all').click( function() {
$('input', oTable.fnGetFilteredNodes()).attr('checked',this.checked);
});
This entry was posted in PHP. Bookmark the permalink.

Please Post Your Comments & Reviews

Your email address will not be published. Required fields are marked *



CAPTCHA
Change the CAPTCHA codeSpeak the CAPTCHA code