Animate to absolute position not working in ie.
Hi all
I have an image that I'd like to animate to the top right of its containing div (which has position relative).
I've used this:
-
$(".trigger").click(function(){
$("#image").css({'position' : 'absolute'}).animate({
"top": "10px"
}, 1000);
});
This works fine in Firefox.
On IE7 though its as though when you click the trigger, it animates 10px from the top. It doesn't animate from its original position like on firefox.
I can nearly fix it by changing it to "top:100%". But I'd like to be more specific.
Its as though FF reads the position as "go to top from original position" and IE reads it as "go 10px from the top".
Any ideas how I can make both use the Firefox way? I have a test here:
http://212.74.24.69/testanimate.asp
much appreciated[/code]