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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:59:16+00:00 2026-06-07T12:59:16+00:00

I have an element that is shown or hidden depending on some condition. I

  • 0

I have an element that is shown or hidden depending on some condition.
I use jQuery fadeIn() and fadeOut() animations to hide or show the element.

My problem is that the positioning of that element is suddenly changed after a fadeOut/fadeIn sequence. However I cannot find any difference in the computed style rules. Neither for the element itself nor for the embedding div tag.
What is changed after the sequence ?

I made a short test case:
http://jsfiddle.net/2QVX8/14/

Note the triangle below the table pointing down, it is centered. When you click the “toggle” button twice the fadeOut/fadeIn sequence is run. Afterwards the element is not centered any more but positioned hard left.

Here is the code of the test case:

HTML:

<button id='toggle'>Toggle</button>
<p/>
<div>
      <table id="list">
        <tbody>
            <tr><td>1-1</td><td>1-2</td></tr>
            <tr><td>2-1</td><td>2-2</td></tr>
            <tr><td>3-1</td><td>3-2</td></tr>
        </tbody>
      </table>
      <div id="footer">
          <span>&#9662;</span>
      </div>
</div>
​

CSS:

table{
  width: 100%;
  border: 1px solid black;   
}
table tr td{
  text-align: center;  
}
#footer{
  position: absolute;
}

​JS/jQuery:

$('#toggle').bind('click',function(){
    if ($('#footer span').is(':visible'))
       $('#footer span').fadeOut('fast');   
  else $('#footer span').fadeIn('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-06-07T12:59:17+00:00Added an answer on June 7, 2026 at 12:59 pm

    I don’t quite understand why, but an absolute position without coordinates will make it unstable. Try this: http://jsfiddle.net/tovic/2QVX8/15/

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

Sidebar

Related Questions

I have created some functional categories that I use to show/hide markup elements. However,
I have a form element, that is hidden or show depending on a dropdown
I have a basic div element to represent a message that I show for
I have a script working to show hide the next() tbody element when another
I have a script right now where a certain element is shown and hidden
I have a simple jQuery script to show/hide list elements accordion-style along with a
I have several divs that are shown and hidden. How can I detect on
I have a container div element that has overflow:hidden on it. Unfortunately this property
I am trying to show only elements that have the title attribute passed to
If have an element that maybe disabled on a page, and would like to

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.