Mauro74
Mauro74

Reputation: 4826

jquery not working in IE

I have a simple animation made in jQuery but for some reason doesn't work in IE8 and previous versions. here's my code:

$(document).ready(function(){
                $('.circle.pink').animate({display: 'block'}, 800, function(){
                    $(this).animate({right: 446}, 1200, 'easeOutExpo')
                });

                $('.circle.green').animate({display: 'block'}, 2000, function(){
                    $(this).animate({right: 20}, 800)
                });

                $('.circle.blue').animate({display: 'block'}, 2800).animate({right: -100}, 800, function(){
                    $(this).css('z-index', '4')
                }).animate({right: 0}, 1000, 'easeOutExpo');
            });

here's the html:

<div class="circles-wrap">
         <div class="circle green"></div>
         <div class="circle pink">
            <article class="intro">
                <span class="logo left"></span>
                <p>Lorem ipsum....</p>                                   
            </article>
         </div>
         <div class="circle blue"></div>
</div>

and the css:

.circle{
    width:514px;
    height:514px;
    display: block;
}

.circle.pink{ background:url('../images/c-pink.png'); position:absolute; right:0; z-index: 3;}
.circle.blue{ background:url('../images/c-blue.png'); position:absolute; right:0; z-index: 2;}
.circle.green{ background:url('../images/c-green.png'); position:absolute; right:0; z-index: 1;}

Any idea why it doesn't work? The commas seem to be in the right place.

Thanks in advance,

Mauro

Upvotes: 0

Views: 174

Answers (1)

Dr.Molle
Dr.Molle

Reputation: 117334

display is not a css-property you can use inside animate(), animate expects properties with numeric values. Maybe this is throwing an error which IE forces to quit.

Upvotes: 2

Related Questions