Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6009435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:58:13+00:00 2026-05-23T01:58:13+00:00

In the below code i am trying to implement the selectall functionality.when i clcik

  • 0

In the below code i am trying to implement the selectall functionality.when i clcik on select all checkbox the checkbox named sts is not getting selected.what am i doing wrong

 $(document).ready(function() {
 $("#selectall").click(function()
     {
        var checked_status = this.checked;
        $(".sts").each(function()
        {
           this.checked = checked_status;
        });
     });
  });
    var ele1 ='<table cellpadding="0" cellspacing="0" border="1" ><tr><th style="width:100px;" ><p align="center">Select all students</p><p align="center"><input type="checkbox" name="sts" class="sts" id="selectall"  /></p></th><th><p align="center">Student name</p></th><th><p align="center">Select Grade</p></th><th><p align="center">Certificates</p></th></tr>';
     for(var l=0;l<data.studentarr.length;l++)
     {
        ele1 +=  '<tr id="s_r_' + data.studentarr[l].id + '" class="students1"><td align="center" style="width:100px;"><input type="checkbox" class="sts" name="sts" /></td><td align="center">' + data.studentarr[l].name +'</td><td align="center">' + getgrade_values(data.studentarr[l].id) + '</td><td>' + data.studentarr[l].download_link + '</td></tr>';
     }
     ele1 += "</table>";
     $('#student_table').append(ele1);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:58:14+00:00Added an answer on May 23, 2026 at 1:58 am

    You are dynamically creating the select all check box, hence you should use live or delegate to bind the click event.

    Try this:

    $("#selectall").live("click" , function()
         {
            var checked_status = this.checked;
            $(".sts").not(this).each(function()
            {
               this.checked = checked_status;
            });
         });
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the code below i`m trying to read a list of selected projects and
I am trying to implement a function. My code is given below. I want
I'm trying to implement scripting capability to my application. I'm using the code below.
I'm trying to implement file upload functionality in the iPhone app. Server code is
I'm trying to implement a DialogPreference in the preferences layout. Unfortunatly, the code below
I am trying to implement the code snippet below. However I am unable to
I have got below code in C# 2.0 and I am trying to implement
I'm trying to implement the code below in my WPF project in order to
In the below code I'm trying to loop through each child node and append
In the below code, i am trying to reference an external .dll, which creates

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.