日期:2014-05-16  浏览次数:20401 次

执行jquery的animate,然后恢复到执行前的状态
html如下:
  <div id='test' style="height: 100px; width: 100px; background-color: Purple;">
    </div> 
<input id="Button3" type="button" value="测试按钮" onclick="forTest();" />

js如下:
   function forTest() {
            $('#test').animate({ left: "100", width: "13", opacity: "0.5", height: "199", fontSize: "67" }, "3000", null);
        }

问题:
能不能执行完forTest()方法后,testdiv能恢复到原始的状态?
或者说,或者说 必选在执行forTest()之前,保存一下状态,执行完后,在手动恢复?有其他简单的办法吗?
jquery javascript html

------解决方案--------------------
忘记把调试语句去掉了。console.log(JSON.stringify(_csses));