それで、私はアニメーション化できるオブジェクトを持っています (これを obj1 と呼びましょう)。他のオブジェクトはアニメーションの前または後に動的に作成できるため、それらのマージン左の位置を obj1 の現在のマージン左に基づくようにします。
これは、関連するコードのスニペットです。奇妙なことは、アラートで動作することですが、アラートを取り出すと、margin-left はデフォルトでスタイルシートに元々あったものになります。タイムアウトは、前の obj が新しい位置へのアニメーション化を完了するまで、新しい obj が作成されないようにするためのものです。
if(!rounds.match12) {
setTimeout(function() {
createMatchup(matchups[6].winner, matchups[7].winner, 12, false); //this creates a new matchup and appendsTo current container
var pos = $('#matchup5').css('margin-left');
alert(pos);
$('#matchup12').css('margin-left' , pos);
alert($('#matchup12').css('margin-left'));
$('#matchup12').css('margin-left' , '-=195');
alert($('#matchup12').css('margin-left'));
rounds.match12 = true;
},1500);
}