broken animated background
Hello. I am using jQueryUI's animate() function and jQueryUI redmond theme CSS file in my page.
I tried to animate a div to a red background. But only the upper half of the div went red. (See the attachment)
Thanks is advance for any explanation
Tested in IE8 & FF3.6 & Safari 5.
PS: removing the jQueryUI theme file or adding a 'useless' "#targetdiv {background:transparent}" to stylesheet will solve the problem but I can't tell why they work.
here is my code:
- <!DOCTYPE html>
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="../css/jquery-ui-1.8.custom.css"/>
- <style type="text/css">
- .kb-anikey1{} .kb-anikey2{} #anikey h3 { margin:0; padding: 0.4em; text-align:
- center; } #anikey { width:240px; padding:0.4em; } #anikey p { }
- </style>
- </head>
- <body>
- <div id="anikey" class="ui-widget-content ui-corner-all">
- <h3 class="ui-widget-header ui-corner-all">
- animate
- </h3>
- <p>
- Lorem ipsum dolor 3 sit amet, consectetur adipiscing elit. Proin in elit
- elit, a egestas orci. Vivamus semper felis ipsum. Vestibulum ante ipsum
- primis in
- </p>
- </div>
- <script src="../js/jquery-1.4.2.js"></script>
- <script src="../js/jquery-ui-1.8.custom.min.js"></script>
- <script>
- $(document).ready(function() {
- $("#anikey").animate({
- backgroundColor: '#aa0000',
- color: '#1e4ffc',
- width: 500
- }, 2000);
- });
- </script>
- </body>
- </html>