jQuery animation works in IE8, not in Firefox or Webkit

Posted by Don on Stack Overflow See other posts from Stack Overflow or by Don
Published on 2010-02-23T22:12:41Z Indexed on 2010/03/31 19:53 UTC
Read the original article Hit count: 502

Filed under:
|
|
|
|

My CSS:

#content {
 border: 2px solid #4190d4;
 padding: 220px;
 background-color: #282828;
 margin-top: 65px;
 -moz-border-radius: 8px;
    -webkit-border-radius: 8px;
}

My jQuery:

$("#header a").click(function() {
   $('#content').animate({padding: 300}, 500);
}

This code works perfectly fine in IE8, my #content div grows from 220px to 300px. In Firefox or Webkit-based browsers, though, my #content div first shrinks to 0px and then resizes to 300px. I'm using jQuery 1.4.2, Firefox 3.6 and Chrome 4.0.249.89.

Any ideas?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about ie8