check checkbox select all / unselect all checked

check checkbox select all / unselect all checked

darkporndarkporn Posts: 1Questions: 0Answers: 0
edited May 2013 in DataTables 1.9
Hi.
I take so much from this site. that I think I can contribute with this.

Already search for it. Seems like its not yet.
So here my code

[code]
//
$(".LINK_OR_BUTTON").click( function(event){

event.preventDefault();

if ( $(":input:checkbox.CLASS:checked", oTable.fnGetNodes()).size() < oTable.fnSettings().fnRecordsTotal()){
$(":input:checkbox.CLASS", oTable.fnGetNodes()).attr("checked", "checked");
$(this).html("[Unselect]").attr("title","[Unselect]");
} else {
$(":input:checkbox.CLASS", oTable.fnGetNodes()).removeAttr("checked");
$(this).html("[Select All]").attr("title","[Select All]");
}
});
[/code]

http://live.datatables.net/ihatir/5/

the link can by move/copy anywhere

Hope you like it
This discussion has been closed.