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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:05:47+00:00 2026-06-11T21:05:47+00:00

What I need this to do is toggle .information when .info is clicked, at

  • 0

What I need this to do is toggle .information when .info is clicked, at same time this hides all other .information divs. I can currently do this my problem is when i click to close an open .information div it won’t close. How can this following code be amended to do this? I have a toggle() so thought that it would work? Just grasping jQuery!!

<ol id="resonsToCome">
    <li>
        <p>A packed and extensive activites programe</p>
        <div class="info">
            <img src="images/icons/information.png" width="24" height="24" />
        </div>
        <div class="information">
            <p>The 40+ activities range from 1 to 2 hours. As everything is on site there is no time wasted travelling which ensures up to 5/6 activities per day.</p>
        </div>
    </li>
    <li>
        <p>Instructors stay with their group throughout your stay</p>
        <div class="info">
            <img src="images/icons/information.png" width="24" height="24" />
        </div>
        <div class="information">
            <p>Building a trust and friendship with our customers makes your stay memorable in so many ways.</p>
        </div>
    </li>
    <li>
        <p>Friendly and experienced instructors</p>
        <div class="info">
            <img src="images/icons/information.png" width="24" height="24" />
        </div>
        <div class="information">
            <p>Our instructors take part in a rigorous selection and continuous training programme.</p>
        </div>
    </li>
    <li>
        <p>A great environment and perfect location!</p>
        <div class="info">
            <img src="images/icons/information.png" width="24" height="24" />
        </div>
        <div class="information">
            <p>25 acres of beautiful Somerset fields, woodlands and river only 2 hours from London and 1 hour south of Bristol and Bath.</p>
        </div>
    </li>
</ol>

And the jQuery

$('div.info').on('click', function() {
        $('.information').hide();
        $(this).closest('ol#resonsToCome li').find('.information').toggle();
    });
  • 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-11T21:05:48+00:00Added an answer on June 11, 2026 at 9:05 pm

    Being that you are hiding everything the toggle is just going to re-show the item that you want to be hidden. Try this

    $(document).ready(function(){
        $('div.info').on('click', function() {
            var closestIsVisible = $(this).closest('ol#resonsToCome li').find('.information').is(":visible");
            $('.information').hide();
            if(!closestIsVisible)
            {
                $(this).closest('ol#resonsToCome li').find('.information').toggle();
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this situation: $(#button).toggle(function(){ $(#window).animate({top:'0%'},1000); },function(){ $(#window).animate({top:'-100%'},1000); }); but I need change it
I need this urgently in my Django site, but because of the time constraint,
All I need this for is strcpy(). I want to see whether the first
this is my script, I'm using a toggle so I can animate a sliding
I have a problem with this jquery script. toggle:function() { if(this.opened){ $(slideToBuyBottomBtnClosed).setStyle(display,block); $(slideToBuyBottomBtnOpen).setStyle(display,none); $(sildeToBuyContent).setStyle(overflow,hidden);
I need this for some animation effects and i remember there is a window
I need this for calling a C function from Java class (JNI) and I
I need this because the constructor in the superclass is calling a method which
I need this roadmap of a Hibernate managed object instance. First, I create an
I need this construction in my HAML code: - if something1 %div.a - elsif

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.