Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
How to check all checkbox for entire column of months in single row?

I have an page with multiple checkboxes.

Each record I embedded checkboxes for months and CHECK ALL button at the end. When I select this button, all checkboxes of all months of specific record must be selected. How can I do this?

View

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try this

$(document).ready(function(){
    $('#select_all').on('click',function(){
        if(this.checked){
            $('.checkbox').each(function(){
                this.checked = true;
            });
        }else{
             $('.checkbox').each(function(){
                this.checked = false;
            });
        }
    });
    $('.checkbox').on('click',function(){
        if($('.checkbox:checked').length == $('.checkbox').length){
            $('#select_all').prop('checked',true);
        }else{
            $('#select_all').prop('checked',false);
        }
    });
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- check box value for input -->
1<input type="checkbox" class="checkbox" name="checkboxlist" value=""/>
2<input type="checkbox" class="checkbox" name="checkboxlist" value=""/>
3<input type="checkbox" class="checkbox" name="checkboxlist" value=""/>
4<input type="checkbox" class="checkbox" name="checkboxlist" value=""/>
<br><br>
<!-- check box for check all -->
<span>select all:</span>
<input type="checkbox" id="select_all" />

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda