[jQuery] Using .center() with Image Crossfade

[jQuery] Using .center() with Image Crossfade

Hi all
I'm trying to use the .center() method on some images to which I've applied the
Image Crossfade from the jQuery blog. At the moment, my code looks somewhat
like this:
current = 1;
if($("#imageContainer img").size() > 0)
{
    $("#imageContainer img").center();
    imgs = $("#imageContainer a").set("xOpacity",0).get();
    $("#imageContainer a:first").set("xOpacity",0.99).show();
    setTimeout(so_xfade,0);
}
It works fine, other than when an image is fading in/out, it pushes out of place
the image it is replacing. This in turn affects the whole page flow, and is
causing me quite a few problems.
My HTML is as follows:
<div id="imageContainer">
<a href="/a.jpg"><img src="/a.jpg"></a>
<a href="/b.jpg"><img src="/b.jpg"></a>
</div>
And my CSS:
#imageContainer
{
position: relative;
float: right;
width: 250px;
height: 270px;
}
#imageContainer a
{
position: relative;
top: 0;
left: 0;
display: block;
width: 250px;
height: 250px;
}
#imageContainer img
{
position: relative;
top: 0;
left: 0;
}
I've tried setting various display/position properties for both images and a
elements, but can't seem to get it working together.
Can someone lend a hand?
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/