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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:02:36+00:00 2026-05-30T18:02:36+00:00

Technically I’m using fadeToggle() but they’re cousins… basically my issue is that I have

  • 0

Technically I’m using fadeToggle() but they’re cousins… basically my issue is that I have an absolutely positioned div which I am using slideToggle() on but the Z-index is not being set until the animation completes. The result is that during the fade the text in a neighboring div (which has a lower z-index value than the one fading in) appears “on top of” the fading in div with a higher z-index.

Is anyone familiar with this quirk? Know of any workarounds?

EDIT: Allow me to clarify: when the animation COMPLETES, the z-index resolves correctly, but during the transition the text is on top of it.

  • 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-30T18:02:37+00:00Added an answer on May 30, 2026 at 6:02 pm

    I just had the same issue so I thought I would share the solution. As you said jQuery does something with fadeIn(), fadeOut(), slideToggle() etc when the elements are absolutely positioned with a z-index, with elements below it also positioned as absolute and given a z-index.

    If you remove the bottom elements you’ll note that your animation runs fine. But with the ‘sub-elements’ you only get your fadeIn when it is totally faded in. That’s because the z-index is only acknowledged once the animation completes.

    The solution is to create a container around each element that you are fading in. You can alternatively create a container around all elements, but keep in mind you won’t have any hover or click effects for the sub-elements where the container div exists.

    So in my example I’ll just use one div that you’re trying to fade in. So let’s say you have a ‘zoom in’ feature that is getting buried during the animation:

    <div id="zoomin"></div>
    
    #zoomin {
      position:absolute; top:20px; right:20px; 
      display:block; z-index:15;
      width:47px; height:48px;
    }
    

    Currently zoom in will disappear. So the solution is to wrap it in a container and apply the following css to that container:

    <!-- this is your container -->
    <div id="zoomincontainer" class="keepontop">
    
      <!-- this is your div --> 
      <div id="zoomin"></div>
    
    <!-- end container -->
    </div>
    
    #zoomincontainer {
      top:20px; right:20px;      
      with:47px; height:48px;
    }
    
    div.keepontop {
      position:absolute; z-index:14;
    }
    

    This will apply a foundation for your div and keep it on top of the other layers during the animation.

    Note that because your ‘zoomin’ div is positioned absolutely, you have to apply the width, height and position characteristics to your container ‘zoomincontainer’ div. Otherwise you’ll find your container div up on the top left corner of your page / frame with 0px x 0px dimensions – it won’t be a foundation for anything unless it covers the entire area beneath the divs you are animating.

    I put the PA and z-index in the ‘keepontop’ class in case you had a number of divs that you are fading in and out.

    Works like a charm now. I hope this helps!

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

Sidebar

Related Questions

I have a ListView (technically its a ListFragment , but I dont think that
I know that technically all three ways below are valid, but is there any
I'm technically savvy but don't have extensive experience with servers/daemons (I'm a Windows guy,
Ok, so I know that technically this is undefined behavior, but nonetheless, I've seen
So I guess this isn't technically a code question, but it's something that I'm
I have a view in the UI that is technically an extended ImageView inside
I'm not sure if this is technically a Kiosk, but it's basically the same
Technically two questions - but they are so heavily related I didn't want to
I have an Excel Spreadsheet (technically it is a Google Docs sheet, but the
I have read that private variables in a base class are technically inherited by

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.