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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:07:29+00:00 2026-06-12T22:07:29+00:00

I have multiple <li> elements which contain multiple <div> elements. Some of them have

  • 0

I have multiple <li> elements which contain multiple <div> elements. Some of them have a starting display property of none.
Based on mouse interaction, I want to show or hide some of the <div> elements.

CSS transitions can’t transition display changes. And setting height and opacity to 0 isn’t a good idea, some of the elements have inputs or buttons.

So the next step was to use JavaScript for animations. I’m using jQuery.

My problem is that elements that need to be hidden or shown in parallel. Because of the DOM structure I can’t just hide or show the parent because some of the elements will be hidden while others will be shown.

So my question is, how would one efficiently handle multiple parallel animations (fades and slides mostly) on multiple elements while keeping code clean and maintainable and performance as good as possible.

An example of markup, where the div elements need to be show or hidden:

<ul>
    <li>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </li>
    <li>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </li>
    <li>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </li>
</ul>

Thank you.

  • 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-12T22:07:30+00:00Added an answer on June 12, 2026 at 10:07 pm

    You can assign the same class to each set of elements that you want to display and hide together. If this doesn’t sound familiar you’re probably going to need to take some time to familiarize yourself with that concept. This should get you started: http://api.jquery.com/hide/

    <div class="first-class"></div>
    <div class="second-class"></div>
    <div class="third-class"></div>
    <div class="first-class"></div>
    <div class="third-class"></div>
    <div class="second-class"></div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a XmlString which contains multiple elements with their nodes. ie <Element> <AccountName>My
The question is simple. I have a string that contains multiple elements which are
I have an ASP.NET 3.5 page which has multiple span elements with ID containing
I have an Array that contains some elements multiple times. Now I want to
Hi I have multiple elements with the same structure in my application. Second div
I have to create seven div elements in one hit - container A which
I have a dynamic data table in JSF which has multiple input elements which
I have a page generated by Yii CListView which contains a div and multiple
I have a table in my document, which may or may not contain multiple
I have source XMLfiles that come in with multiple root elements and there is

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.