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

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -