Change jQuery's animation duration during animating
问题 Is it possible to change the duration of a currently running jQuery animation between two different values? I've tried to change the duration via direct assignment, but no success: var timing = { duration: 4000 }; $(document).click(function (e) { timing.duration = 1000; }); $('#foo').animate({top:200, left:200}, timing); ...and even, changing the fx.options.duration in step -method does not affect the running animation: var state = false, $(document).click(function (e) { state = true; }); $('