i have rotating image in my webpage.
link is below:
http://equosinfotech.com/testdemo/test.html
everything works fine as i wanted, i just want to slow down the rotation speed of the image as its too fast and i am not able to find a way to slow it down.
(you can see the code from the page source)
i just need anyone to help me to slow down the rotation.
javascript i am using:
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;
}
});
}
Try add in your code, to
$("#image").rotate({..theduration:2000,, or how many secconds you want (2000 is 2 sec. in millisecconds).