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

  • Home
  • SEARCH
  • 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 6472527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:21:18+00:00 2026-05-25T06:21:18+00:00

Im having trouble making 1 mass showhide for multiple documents. This showhide must be

  • 0

Im having trouble making 1 mass showhide for multiple documents. This showhide must be able to contain other elements within it as well, such as ol ul li etc. Currently I’m having trouble showing the other content besides the tag as well as adding another showhide inside of the original show hide

Also to display a box with the content in it.

HTML:

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script src="showhideJQuery.js"></script>
</head>
<style>
.showhide {
    width:500px;
    height:200px;
    margin:1em .5em;
}
.showhide h3 {
    margin: 0;
    padding: .25em;
    background:#0033CC;
    border-top:1px solid #666666;
    border-bottom:1px solid #666666;
}
.showhide div {
    padding: .5em .25em;
}
</style>

<body>
<div class="showhide">
    <h3>Title 1</h3>
    <div>
        <ol>
            <li>Hey!</li>
            <div class="showhide">
                <h3>Another one?!</h3>
                <div>YES!</div>
            </div>
        </ol>
    </div>

</div>
</body>
</html>

JQuery

$(document).ready(function(){
$('div.showhide:eq(0)> div').hide();
$('div.showhide:eq(0)> h3').click(function() { 
    $(this).next().slideToggle('fast');                                            

});

});

  • 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-25T06:21:19+00:00Added an answer on May 25, 2026 at 6:21 am

    By adding class attributes to the item you want to trigger the show/hide and the element you want shown / hidden you can do something like this:

    HTML:

    <body>
    <div class="showhide">
        <h3 class="showhideclick">Title 1</h3>
        <div class="showhidecontainer">
            <ol>
                <li>Hey!</li>
                <div class="showhide">
                    <h3 class="showhideclick">Another one?!</h3>
                    <div class="showhidecontainer">YES!</div>
                </div>
            </ol>
        </div>
    
    </div>
    </body>
    

    JS:

    $(document).ready(function(){
        $('.showhidecontainer').hide();
        $('.showhideclick').click(function() { 
            $(this).next('.showhidecontainer').slideToggle('fast');                                            
        });
    });
    

    This also gives you the flexibility to use different elements to contain your hidden content and which element triggers the action.

    Hope this helps.

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

Sidebar

Related Questions

I'm having trouble with the way I designed this little report I'm making. Is
I am having trouble simply making multiple pages with CodeIgniter. For example, I am
I am having trouble making this work and am looking for some help. Currently
I'm having trouble making this work. Apparently, i can't use > or < in
I'm having trouble making this work: $(function() { $(.button).click(function() { var newentry = $(input#entry).val();
Having Trouble making sql connection. this is my code private static SqlConnection GetConnection() {
I'm having trouble making a secure FTP connection using SharpSSH. Up to now I've
I am a bit of an ant newbie, and I'm having trouble making a
I'm having trouble with making a subdomain to my Windows computer while using AJP
I'm having a trouble making a re-sizable rectangle for cropping my images. I'm trying

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.