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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:35:05+00:00 2026-05-11T12:35:05+00:00

I am trying to use jQuery to fade out a div, using the fadeOut

  • 0

I am trying to use jQuery to fade out a div, using the fadeOut function. In most cases, it seems to work fine, but in certain cases, not all of the content fades out. If I have an absolutely positioned element and a floated element within the div, the fadeOut function doesn’t work. If I only have an absolutely positioned element, it doesn’t work. But if I have an absolutely positioned element and an unstyled element, it works. This may sound hard to explain, but you can try it yourself using this test code:

<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'     'http://www.w3.org/TR/html4/loose.dtd'> <html><head> <title>jQuery fadeOut test</title> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <script type='text/javascript' src='jquery-1.3.2.min.js'></script> </head> <body> <div id='testBox1' style='position: relative'>     <div>test</div>     <p style='position: absolute; left: 0; top: 0'>This text should fade out.</p> </div> <br><br> <button type='button' onclick='$('#testBox1').fadeOut()'>fade out</button> <!-- works --> <hr>  <div id='testBox2' style='position: relative'>     <div style='float: left'>test</div>     <p style='position: absolute; left: 0; top: 0'>This text should fade out.</p> </div> <br><br> <button type='button' onclick='$('#testBox2').fadeOut()'>fade out</button> <!-- doesn't work --> <hr>  <div id='testBox3' style='position: relative'>     <p style='position: absolute; left: 0; top: 0'>This text should fade out.</p> </div> <br><br> <button type='button' onclick='$('#testBox3').fadeOut()'>fade out</button> <!-- doesn't work --> </body></html> 

Working Example Here (add /edit to the URL to play with the example).

Everything seems to work fine in IE7, but in Firefox and Chrome, I am getting the strange behavior. Can anyone figure out why? Am I doing something wrong, or is it a browser bug or a bug within jQuery?

  • 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. 2026-05-11T12:35:06+00:00Added an answer on May 11, 2026 at 12:35 pm

    It’s a bug within 1.3.2. I don’t see the behavior in 1.3.

    Point your jQuery script to

    http://jqueryjs.googlecode.com/files/jquery-1.3.min.js

    And you’ll see the problem disappear.

    Here’s an example with it fixed:

    http://jsbin.com/olule/edit

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

Sidebar

Related Questions

Im trying to use this code: <script> jQuery('#MySelectorDiv').fadeTo(500,0.2); </script> To fade out a bunch
I'm trying to use jquery to fade out a <p> tag within a <li>
I am trying to use jQuery fadIn function in my web app but the
I'm currently trying to use jQuery to fade a particular div which contains a
I am trying to use JS/JQuery to make tiles that will fade out then
I'm trying to add a simple fade in/out effect to the buttons by jQuery
I'm trying to use jQuery's get function to call my php script. The php
Im trying to use if else statement in success ajax function, but the value
I'm trying to use jquery to animate between two images, fading one out then
I'm trying to use the jQuery bxSlider to fade in elements on my slides.

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.