Thanks for the reply and alteration jakecigar.
Yes, I think this is the second time I've made a folly with the else if. Silly mistake. So adjust the left property to 0 when the sequence of commands is issued? So it animates(left +202), detaches, attaches(appends) then resets left: 0px, which makes it sit inside the new container properly? How come when it appends to the new container it doesn't jump automatically to left:+202px, then jump back to left:0px after the additional CSS positioning command? (more curious on the priority of commands I guess, because it seems like it doesn't adopt all of the new containers attributes until after that entire line of commands is finalized? :P ... in anycase thanks for the solution
I have another problem though...
I've slowed it down now to show what the main problem is. Containers 1-3 animate to the right, while container 4 animates to left to container 1. The problem is Containers 1-3 disappear as soon as they animate outside of their container. It's as if they have a hidden overflow or their Z-index is dropping below for some reason.
Tbh I'm not sure, because container 4 animates across all 4 containers and is visible during the entire animation. I suppose that could be the issue, but it looks more like it's related to either the individual jQuery code or the CSS for the containers.
http://jsfiddle.net/M4v3F/5/- .containers {
width:200px;
height:200px;
border:1px solid black;
background-color:white;
float:left;
display:inline-block;
white-space:nowrap;
position:relative;
} - $("#image1").animate({
left: '202px'
}, 2000, function () {
$(this).detach().appendTo("#box2").css("left","")
});
$("#image4").animate({
left: '-606px'
}, function () {
$(this).detach().appendTo("#box1").css("left","")
});