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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:22:34+00:00 2026-05-20T07:22:34+00:00

Little help needed if possible. I think I’m close just can’t quite figure it

  • 0

Little help needed if possible. I think I’m close just can’t quite figure it out. Basically as the title says, I need to have a few tickboxes, if a box is ticked an accordion effect will kick in and reveal a textarea.

If the box is ticked, I need the accordion to stay open.

If the box is then un-ticked, I need the accordion to close up.

HTML
`
Solid Foundations (The Wheel)

Where you are fully compliant no further comment is necessary. Where you are not yet fully compliant please provide more information.

                        <div class="CheckButton two">
                            <label><input type="checkbox" />Getting to Grips With Governance (The Wheel)</label>                        
                        </div><!--checkButton-->
                        <div class="TextareaAccordion two">
                            <p><span class="helptext">Where you are fully compliant no further comment is necessary. Where you are not yet fully compliant please provide more information.</span></p>
                            <textarea name="" cols="10" rows="3" id="explanatorytext"></textarea>
                        </div>

                        <div class="CheckButton three">
                            <label><input type="checkbox" />Reducing the Risk (The Wheel)</label>                       
                        </div><!--checkButton-->
                        <div class="TextareaAccordion three">
                            <p><span class="helptext">Where you are fully compliant no further comment is necessary. Where you are not yet fully compliant please provide more information.</span></p>
                            <textarea name="" cols="10" rows="3" id="explanatorytext"></textarea>
                        </div>`

JS

<script type="text/javascript">
                    $(document).ready(function() {
                        //ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING)
                        $('.CheckButton.one, .CheckButton.two, .CheckButton.three, .CheckButton.four, .CheckButton.five, .CheckButton.six, .CheckButton.seven, .CheckButton.eight, .CheckButton.nine').click(function() {

                        if($(this).next().is(':hidden') == true) {
                        //ADD THE ON CLASS TO THE BUTTON
                        $(this).addClass('on');
                        //OPEN THE SLIDE
                        $(this).next().slideDown('normal');
                        } 

                    });




                    /**CLOSES ALL S ON PAGE LOAD**/
                    $('.TextareaAccordion.one, .TextareaAccordion.two, .TextareaAccordion.three, .TextareaAccordion.four, .TextareaAccordion.five, .TextareaAccordion.six, .TextareaAccordion.seven, .TextareaAccordion.eight, .TextareaAccordion.nine').hide();});
                </script>

Thanks in advance!

  • 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-20T07:22:35+00:00Added an answer on May 20, 2026 at 7:22 am

    Firstly, I would take this out:

    $('.TextareaAccordion.one, .TextareaAccordion.two, .TextareaAccordion.three, .TextareaAccordion.four, .TextareaAccordion.five, .TextareaAccordion.six, .TextareaAccordion.seven, .TextareaAccordion.eight, .TextareaAccordion.nine').hide();
    

    I would simply use CSS to hide those div tags.

    Secondly, you don’t have to reference each of them individually, $('.TextareaAccordion').hide(); would suffice.

    Here is my solution: http://jsbin.com/egude4/22/edit

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

Sidebar

Related Questions

A little help here to figure out what error to run this piece of
Little help if you don't mind. Basically, I have 3 radio boxes and a
I need little help for url rewriting in wordpress. basically what i need: mydomain.com/mysomewordpresspost
A little help needed, I have a Macro automatically creating pivot tables and charts,
I needed some help in trying to optimize this code portion ... Basically here's
I'm a little confused by what I've learned today. I hope somebody can help
I'm back to C++ and little help is needed. I know what's const pointer,
i needed little help on how to go about it. i do not have
A little help needed. I'm receiving an xml file similar to this: <?xml version=1.0
A little help from those who’ve used Timthumb before. http://themes.amplus.gambit.ph/wp-content/themes/amplus/functions/timthumb.php?src=http://themes.amplus.gambit.ph/wp-content/uploads/2011/02/12979795614923485443_a1967ff888_b.jpg&w=860&h=300&f=5,255,0,0,0 This image should be

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.