I have a problem, this:
- a configuration page list thousand clients, options are radio button
- i have one chechbox in the first row of the table for each column (group of 3 radio button) for check/uncheck all radio
Problem: Check all radio take more of 30 seconds
I test this:
Case ONE:
checkTodos: class of checkbox
columna + col : class of radio
Código PHP:
function checkMultiple(col){
$('.checkTodos').click(function(event){
if($(this).is(':checked')) {
$('.columna'+col).attr('checked', 'true');
}else{
$('.columna'+col + ':radio:checked').removeAttr('checked');
}
});
}
Case TWO:
checkeado: global variable
Código PHP:
function checkMultiple(col){
if(checkeado){
$('.columna5').attr('checked', 'true');
checkeado = false;
}
else{
$('.columna5').attr('checked', 'false');
checkeado = true;
}
}