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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:23:14+00:00 2026-05-26T18:23:14+00:00

I have a strange but simple problem with the .animate() function in IE9. I

  • 0

I have a strange but simple problem with the .animate() function in IE9. I say strange because it works as expected even in IE6.

I have two unordered lists. When someone hovers over an li in the first list the corresponding li animates in the second list. This works properly with all the good browsers and also IE6. But in IE9 only the first li animates, the other two are not animating.

Here is the mark up:

    <ul id="nav">
        <li id="nav_one"><h1>NAV ONE<h1><p>This animates in IE9</p></li>
        <li id="nav_two"><h1>NAV TWO<h1><p>This does not animate in IE9</p></li>
        <li id="nav_three"><h1>NAV THREE<h1><p>This does not animate in IE9</p></li>
    </ul>
    <ul id="nav_wrapper">
        <li id="nav_wrapper_one"><h1>&nbsp;<h1><p>&nbsp;</p></li>
        <li id="nav_wrapper_two"><h1>&nbsp;<h1><p>&nbsp;</p></li>
        <li id="nav_wrapper_three"><h1>&nbsp;<h1><p>&nbsp;</p></li>
    </ul>

Here is the CSS:

#nav{
    color: #fff;
    font-family: 'Open Sans Condensed', Arial, sans-serif;
    margin: 2% 2%;
    position:absolute;
    top:0px;
    z-index: 3;
}
#nav h1{
    font-size:42px;
}
#nav p{
    font-size:16px;
}
#nav_wrapper{
    color: #fff;
    font-family: 'Open Sans Condensed', Arial, sans-serif;
    margin: 2% 2%;
    position:absolute;
    top:0px;
    width:100%;
    z-index: 2;
}
#nav_wrapper h1{
    font-size:42px;
}
#nav_wrapper p{
    font-size:16px;
}
#nav_wrapper li{
    background: rgb(200, 200, 200);
    background: rgba(200, 200, 200, 0.6);
    overflow:hidden;
    width:0%;
}

Conditional CSS for IE:

#nav_wrapper li{
    background:none;
    /* For IE 5.5 - 9*/
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#60c8c8c8, endColorstr=#60c8c8c8);
    /* For IE 8*/
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#60c8c8c8, endColorstr=#60c8c8c8)";
    zoom: 1;
}

And finally the jQuery:

$("#nav_one").hover(
function(){ $("#nav_wrapper_one").stop().animate({width: '96%'}, 300); },
function(){ $("#nav_wrapper_one").stop().animate({width: '0%'}, 300); }
);
$("#nav_two").hover(
function(){ $("#nav_wrapper_two").stop().animate({width: '96%'}, 300); },
function(){ $("#nav_wrapper_two").stop().animate({width: '0%'}, 300); }
);
$("#nav_three").hover(
function(){ $("#nav_wrapper_three").stop().animate({width: '96%'}, 300); },
function(){ $("#nav_wrapper_three").stop().animate({width: '0%'}, 300); }
);

PLEASE PLEASE PLEASE HELP !! I’m at the end of my tether trying to fix this. But hey i’m just a noob with jQuery so I won’t realize it even if i’m staring at the problem right now. I know what i’m trying to achieve can be done through plugins. But if I could use it, I would have done so a long time ago. Any help will be appreciated. Thanks in advance.

  • 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-26T18:23:14+00:00Added an answer on May 26, 2026 at 6:23 pm

    Fix your closing </h1> tags. You have them as <h1>. The closing tags should be </h1>.

    <ul id="nav">
        <li id="nav_one"><h1>NAV ONE</h1><p>This animates in IE9</p></li>
        <li id="nav_two"><h1>NAV TWO</h1><p>This does not animate in IE9</p></li>
        <li id="nav_three"><h1>NAV THREE</h1><p>This does not animate in IE9</p></li>
    </ul>
    <ul id="nav_wrapper">
        <li id="nav_wrapper_one"><h1>&nbsp;</h1><p>&nbsp;</p></li>
        <li id="nav_wrapper_two"><h1>&nbsp;</h1><p>&nbsp;</p></li>
        <li id="nav_wrapper_three"><h1>&nbsp;</h1><p>&nbsp;</p></li>
    </ul>
    

    Also, you can replace all three blocks of near identical code with this:

    function makeWrapper(el) {
        return $("#" + el.id.replace(/_/, "_wrapper_"));
    }
    
    $("#nav li").hover(
        function(){makeWrapper(this).stop().animate({width: '96%'}, 300); },
        function(){makeWrapper(this).stop().animate({width: '0%'}, 300); }
    );
    

    It’s highly desirable to avoid repeated code whenever possible. You can see it work here: http://jsfiddle.net/jfriend00/v5dmn/.

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

Sidebar

Related Questions

I have a simple but strange problem. I compare to strings, (taken from different
I have a strange problem. I have created a simple function to convert from
I have got a simple but strange problem. I am unable to set size
I have a strange problem with the <ui:repeat> tag. Even for my very simple
I seem to have a strange problem. I am working on a simple dashboard
I have a strange build problem. I have a simple test program that sends
I am having a very strange problem in a simple program and have been
I expected this to be simple, but I'm getting some strange results. I'd appreciate
I have very strange problem with mySQL and simple query with simple index. I
I have a rather strange problem. I have a very simple application that reads

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.