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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:01:20+00:00 2026-06-07T14:01:20+00:00

I have a page that has a form and a generated content area that

  • 0

I have a page that has a form and a generated content area that both have section and subsection hiding via checkboxes. (the checkboxes are hidden on the page, but not on the fiddle to show ‘checked’ state of the checkboxes)

Here is the fiddle. It may look like a lot, but hang in there, it really isn’t. I have what should be an easy problem, let me show you where the issue is.

I am trying to add functionality to the page, so that when a user deselects all subsections of a section from the left pane, that the section as a whole hides on the left, and the right side form lets you know the entire section is hidden (RED text in the fiddle), but doesn’t allow subsection changing to keep persistance. I can hide all subsections by clicking them in the left pane, with the left section disappearing, and the right subsections hiding themselves, and the right header notifying you it is is hidden on the left. The issue lies when the right header is clicked to unhide the section in the left, the subsections are no longer visible or ‘reset’.

Here is the code that deals with checking if all of the subsections are hidden:

if (($('fieldset.abstract > div > input:checkbox:checked').length+1) == 7){
    //Left Side
    $('.block > .abstract > .superseven > section input').each(function(){
        $(this).prop('checked' , true);
    });
    $('.block > .abstract > .superseven > section').eq(index).hide();  
    $('.block > .abstract').hide("slow");
    //Right Side
    $('fieldset.abstract label:first').toggleClass('hidden');
    $('fieldset.abstract > div > input').each(function(){
            $(this).prop('checked' , false);
    });
    $('fieldset.abstract > div > label').each(function(){
            $(this).hide("slow");
    });

How do I ‘reset’ the checkboxes to a page load, ONLY after all of the subsections were hidden? It should be that once the user clicks the right section header to bring the section back on the left, all of the subsections are visible.

  • If I apply a regular condition ( similar to the lower section in the JS labeled //Toggle Section completely) when the right section header is clicked, it will not keep persistence from when only a few subsections are hidden and then the entire section.
  • I was thinking that it might be possible if I keep track with a state variable, but dont know about variable scoping in Jquery (I would assume it would have to be global, which I am under the understanding that is not good practice),
  • or this entire section of Jquery could be wrapped in a self calling function like this:

    (function name() { … })();

Any other programming approaches I might be able to use?

Sorry for the in-depthness, new to js/jquery, and I hope the fiddle helps, not hurts.

Clarification of what should happen:

  • Click all of the left side subsections, and they disappear
  • the right side subsections (labels only, as all checkboxes are not visible in live page) should disappear
  • the right side section header should turn red
  • click the right side section header
  • the left side section should appear (all of this up to here is working, here is where it breaks) AND all subsections in the left should be visible, as if it were reset (the same as when the page loads, but only for this particular section, as there are multiple of these sections), as the user hid all of the subsection, so the entire section was hidden, and now the user wants the left section back, and all subsections should be visible.

Notes:

Current working functionality:

  • hiding the entire section from the header
  • hiding all but one of the subsections
  • hiding subsections, then choosing to hide the entire section, and keeping persistance when unhiding the entire section
  • 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-07T14:01:21+00:00Added an answer on June 7, 2026 at 2:01 pm

    for the question of initial block, i think is a width issue, try to change some width, try 14.28 instead of 14.326647564469914, ( I respond via IPad and with this device work correctly )

    To sum the comments, this code: reset the initial case and set the correctly width of sub section

    if(!$('.block > .abstract').is(':visible')) {
          $('fieldset.abstract #abstract_all').prop('checked' , false);
          $('.superseven ').children().show();
          var width = ((1/7)*100);
          $('.superseven ').find('div').css("width", width + '%')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that has several ajax submission forms. Each form has a
I have A single page that has the following structure <form runat=server><placeholder></placeholder></form> I have
I have a page that has a gif animation in a hidden div. Upon
I have a page that has fields dynamically loaded via JQuery. It allows a
We have a customized asp.net web form page (generated by sharePoint). The page has
I have a simple form that has a list (dropdown list generated from a
I have a page that has no vertical scroll, rather, everything is displayed horizontally.
I have a page that has 2 columns of words, 20 total, that are
I have a page that has a bunch of user controls on it. I
I have a page that has a large image on it with a number

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.