I am trying to change jQuery animate's duration with step function while animation is on, like easing effects. I created an example to inspect it, here is jsFiddle.\[code\]$('span').click(function() { var _this = $(this); if( !_this.is(':animated') ) { var target = 400; var speed = 1000; _this.animate({'top': target +'px'},{ duration: speed, step: function(now,fx) { //what does fx stands for anyway, i cound'nt solve it? if ( now >= 300 ) { speed=100; } //condition works but it won't effect the current animation } }); }});\[/code\]