Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

117
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!