无法让jqueryrotate工作
我没有运气在这个页面上获得jqueryrotate示例#2来处理一个简单的html页面。 我究竟做错了什么? 谢谢您的帮助。
这是我的代码 –
#img { margin:100px 100px;} $("#img").rotate({ bind: { mouseover : function() { $(this).rotate({animateTo:180}) }, mouseout : function() { $(this).rotate({animateTo:0}) } } });
你的代码工作正常,请看这里 。
你可能应该准备好了 。
$(document).ready(function() { $("#img").rotate({ bind: { mouseover: function() { $(this).rotate({ animateTo: 180 }) }, mouseout: function() { $(this).rotate({ animateTo: 0 }) } } }); });
另外,我不建议使用id #img
这不是它的错,它只是丑陋的IMO。