You can now extend jQuery animations with a function that is fired on every step of the animation that changes the style of the element being animated. It can be extended for specific css properties, or even to create a custom animation type.For example, you can pass in an extra step function to .animate() to perform actions like animation synchronization.
$("#go").click(function(){
$(".block:first").animate({ left: 100 }, {
duration: 1000,
step: function(now, fx){
$(".block:gt(0)").css("left", now);
}
});
});
Fortunately, a quick search on Google for “jquery animate step” will
yield the
jQuery 1.2 release notes that sheds a bit of light on
the step function:
No comments:
Post a Comment
Please Provide your feedback here