Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Check thousand radio button take many times

Estas en el tema de Check thousand radio button take many times en el foro de Frameworks JS en Foros del Web. hello my friend, I have a problem, this: - a configuration page list thousand clients, options are radio button - i have one chechbox in ...
  #1 (permalink)  
Antiguo 21/09/2011, 07:51
 
Fecha de Ingreso: junio-2008
Mensajes: 53
Antigüedad: 15 años, 10 meses
Puntos: 1
Pregunta Check thousand radio button take many times

hello my friend,

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;
    }


Etiquetas: jquery
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:22.