<script type="text/javascript" src="http://jqueryrotate.googlecode.com/svn/trunk/jQueryRotate.js"></script>
<img src="https://www.google.com/images/srpr/logo3w.png" id="image">
<button id ="left">left</button>
<button id ="right">Right</button>
$("#left").click({
$("#image").rotate({ animateTo:180 })
});
$("#right").click({
$("#image").rotate({animateTo:0})
});
Iam无法使用按钮
旋转图像答案 0 :(得分:1)
你必须将一个函数绑定到事件(在这种情况下在'click'中)
$("#left").click(function() {
$("#image").rotate({ animateTo: 180 });
});
$("#right").click(function() {
$("#image").rotate({ animateTo: 0 })
});
答案 1 :(得分:1)