我有一个<input>元素,我正在为它做两件事:使用.animate()将背景褪色为绿色,以及使用.effect()摇动它。这是我的代码:
$myInputElement.animate({backgroundColor: 'green'}, 1000).effect( "shake", {times:3, distance:2}, 40 );问题是,首先背景消失,然后元素抖动。我怎么能让两者同时发生呢?
发布于 2011-07-27 03:10:16
更新了:
首先运行40毫秒的一个:http://jsfiddle.net/96DQ6/4/
发布于 2011-07-27 02:58:13
你试过这样做吗?
$myInputElement.animate({backgroundColor: 'green'}, 1000);
$myInputElement.effect( "shake", {times:3, distance:2}, 40 );https://stackoverflow.com/questions/6838985
复制相似问题