我正在尝试将方向变量传递给jQuery animate函数,但动画无法正常工作。
HTML
<div class="box">Box</div>
JS
var direction = 'left';
$('.box').animate({direction : '100'},500);