嘿,我想知道这两个代码有什么区别?第一个有效,第二个无效?
First >>
for (i=0; i<$sequencingArray.length; i++){
...
$($sequencingArray[i]).delay(i*100).animate({'margin-left':$masterWidth});
...
}
Second >>
$propToAnimate = 'margin-left';
for (i=0; i<$sequencingArray.length; i++){
...
$($sequencingArray[i]).delay(i*100).animate({$propToAnimate:$masterWidth});
...
}