javascript旋转图像

问题描述:

我在我的网页上有旋转图像。
链接如下:javascript旋转图像

http://equosinfotech.com/testdemo/test.html

一切工作正常,因为我想,我只是想放慢形象作为其过快的旋转速度,我无法找到一个方法来减缓它下。

(你可以看到代码的页面源)

我只是需要有人帮我旋转减慢。

的javascript我使用:

var stop = function(){ 
     $("#image").rotate({ 

    angle:0, 
    animateTo:0, 
    callback: stop, 
    easing: function (x,t,b,c,d){  // t: current time, b: begInnIng value, c:   change In value, d: duration 
       return c*(t/d)+b; 
      } 
     }); 
    } 

    $(document).ready(function() 
    { 
    rotation();​ 
     $("#image").rotate({ 
bind: 
{ 
    mouseover : function() { 
    stop(); 
    }, 
    mouseout : function() { 
    rotation(); 
    } 
} 
}); 
    }); 
var rotation = function() { 
$("#image").rotate({ 

    angle: 0, 
    animateTo: 360, 
    callback: rotation, 
    easing: function(x, t, b, c, d) { // t: current time, b: begInnIng value, c: change In value, d: duration 
     return c * (t/d) + b; 
    } 
}); 
    } 
+1

总是在问题本身**中包含相关的代码和标记**,不要只是链接。为什么:http://meta.stackexchange.com/questions/118392/add-stack-overfow-faq-entry-or-similar-for-putting-code-in-the-question – 2012-04-16 11:09:13

试加在你的代码,以$("#image").rotate({..duration:2000,,或者有多少secconds你想(2000年为2秒的millisecconds)。

+0

acctually它做的工作,我 – jackerj 2012-04-16 11:23:46

+0

已经把持续时间:10000,贝洛代码VAR旋转=函数(){ $( “#图像”)旋转({ 持续时间:10000, 角度:0, animateTo:360, 回调:旋转, 宽松:函数(X,T,b,C,d){// T:当前时间,b:开始值,C:变化在值,d:持续时间 返回C *(T/d)+ b; } } ); – jackerj 2012-04-16 11:24:13

+0

它实际上减慢了旋转,但在鼠标移出后只在页面加载不了 – jackerj 2012-04-16 11:25:26