私は、次のjQueryの拡張機能があります。jQuery回転機能が起動しません。
(function ($) { //jQuery plugin extension
jQuery.fn.rotate = function(degree, maxDegree) {
this.css({ WebkitTransform: 'rotate(' + degree + 'deg)'});
this.css({ '-moz-transform': 'rotate(' + degree + 'deg)'});
// Animate rotation with a recursive call
rotation = setInterval(function() {
if (degree < (maxDegree/2)) {
$(this).rotate(++degree);
} else {
clearInterval(rotation);
}
},5);
};
}(jQuery));
をそして、私はこのようにそれを呼んでいる:ここでは、
$('#test').live('mouseover',function() {
$(this).rotate(0, 360);
});
しかし、それは発生しませんがJSFiddleです: http://jsfiddle.net/neuroflux/8vZqr/
あなたがCAではありません
おっとは、私が持っている - 私はSOにそれを置くことを忘れてしまいました。まだ起動しない:( –
@Neurofluxation:私の最新のアップデートを参照...それは今働く。 –
パーフェクト!乾杯フェリックス。 –