resize - jQuery - call function when animate -
is possible call function in .animate event? have call resize() function every resize event on div.
for example, call function on window resize event:
$(window).resize(resize); but wish call function inside animate event(every changed pixel(like .resize does)).
selector['el']['box'].animate({width:selector['el']['box'].width() - 250}, 500); selector['el']['box'].promise().done(function() {resize();}); but not want, because wish resize function called time, not on end...
you use step function, like:
selector['el']['box'].animate({width:selector['el']['box'].width() - 250}, 500, step: function( currentstep ){ //step animation complete //do here }); see :: step in animate()
Comments
Post a Comment