我使用jQueryRotate.js擴展到執行上的一個縮影箭頭旋轉操作(會那樣,在OS X AQUA文件系統),因爲這裏找到:jQueryRotate點擊問題
http://wilq32.adobeair.pl/jQueryRotate/Wilq32.jQueryRotate.html
$(document).ready(function() {
var rot=$('#expand-FT078Z8').rotate({maxAngle:25,minAngle:-55, duration:570,
easing:$.easing.easeInOutExpo,
bind:
[
{"click":function(){rot[0].rotateAnimation(90);}}
]
});
});
雖然,當我添加另一個「點擊」功能的箭頭,回到原來的位置,因爲在這種方式:
{"click":function(){rot[0].rotateAnimation(90);}}, {"click":function(){rot[0].rotateAnimation(0);}}
功能中斷。這遵循使用說明,因爲您可以添加多個事件。現在,通常情況下,我會將狀態保存在一個JavaScript變量中,但這似乎超出了此庫的範圍。任何人都知道我會如何去做到這一點?請告訴我。謝謝!
感謝,我最終只是做了粗魯的翻轉,但現在你已經澄清,也許我可以投入一些東西! :d – Lucas 2011-11-08 06:17:46