$("#checkAll").click(function(){
$(".pageTablePub :checkbox").each(function(){
if ( $("#checkAll").is(':checked') ){
$(this).prop("checked",true);
}else {
$(this).prop("checked",false);
}
});
});