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 8987607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:50:15+00:00 2026-06-15T21:50:15+00:00

I have 32 checkboxes (checkbox1,checkbox2,checkbox3…. checkbox32) and 32 div(div1,div2,div3…..div32) and one asp:Button. On button

  • 0

I have 32 checkboxes (checkbox1,checkbox2,checkbox3…. checkbox32) and 32 div(div1,div2,div3…..div32) and one asp:Button.

On button click I need to make div1 visble if checkbox1 checked true and div2 visble if checkbox2 checked true and div3 visble if checkbox3 checked true and so on using JQuery..

<div class="CheckBoxDiv ">
        <asp:CheckBox ID="checkBox1" runat="server"  />

    </div>
        <asp:CheckBox ID="checkBox2" runat="server"  />

    </div>        .
                  .
                  .

<asp:Button ID="buttonShowData" runat="server" Text="Show data" class="ShowDataButton"  />

<div id="div1" runat="server" visible="false">
               ......
</div>
<div id="div2" runat="server" visible="false">
               ......
</div>
                    .
                    .
  • 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-06-15T21:50:16+00:00Added an answer on June 15, 2026 at 9:50 pm
    $("button").on('click', function () {
        $(":checkbox").each(function (idx) {
           if ($(this).is(":checked")) {
              $("div").eq(idx + 1).show();
           }
           else {
              $("div").eq(idx + 1).hide();
           }
        });
    });
    

    This goes through all checkboxes and shows/hides corresponding divs from all available divs. It’s highly likely that you’ll want to use more specific selectors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If i have 3 asp.net checkboxes in my asp.net webform namely : CheckBox1, Checkbox2,
I have six checkboxes. Shown as like this Checkbox1 <input type=checkbox id=check1> Checkbox2 <input
I have two checkboxes with different names: <input type=checkbox name=checkbox1 value=checkbox1> <input type=checkbox name=checkbox2
i have disabled all the checkboxes except one. On click of that checkbox i
I have unlimited asp.net checkboxes to my webpage .How to insert checkbox checked value
I have a small application that has several checkboxes, a submit button, and a
I’m trying to give the user selection group of 8 checkboxes (CheckBox1, CheckBox2, …etc),
For example, i have checkboxes: <input type='checkbox' name='fruit' value='apple'> Apple <input type='checkbox' name='fruit' value='orange'>
I'm trying to setup custom validation for a checkbox. I have 7 checkboxes each
I need to have custom checkboxes which wasn't that tricky. I made checkbox_selector to

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.