Here is my animation:
$(".ImageRoller ul").animate({ 'marginLeft' : "-"+ScrollWidth+"px" },Speed );
Now i want to make an alert or something when the animation ends. Is that even possible?
Chears Vali
Here is my animation:
$(".ImageRoller ul").animate({ 'marginLeft' : "-"+ScrollWidth+"px" },Speed );
Now i want to make an alert or something when the animation ends. Is that even possible?
Chears Vali
According to the documentation you could define a callback function which will be called once the animation ends:
animate( params, [duration], [easing], [callback] )
$(".ImageRoller ul").animate(
{'marginLeft' : "-"+ScrollWidth+"px"},
Speed,
'linear',
function() {
alert('animation end');
}
);
$(".ImageRoller ul").animate (
{
'marginLeft' : "-"+ScrollWidth+"px"
},
{
duration: Speed,
complete: function () { doSomething (); }
}
);