我正在尝试在 jquery 中旋转按钮!
这是我在 jsfiddle 上创建的
jquery代码
$("#no").rotate({
angle:0,
bind: {
click : function(){
var curAngle = parseInt($(this).getRotateAngle());
$(this).rotate({
angle: curAngle,
animateTo: curAngle + 30
});
}
}
});
最佳答案
.rotate()
不是官方的 jQuery 函数,您需要手动加载它。
为此,download the library by clicking here并使用以下内容引用您的应用程序:
<script type="text/javascript" src="js/jQueryRotate.2.2.js"></script>
在 jsFiddle 中,我只是添加了一个外部库。要查看工作情况,click here .
关于jquery - 尝试在 jquery 中旋转按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17525205/