title: jQuery - call function when animate
body: <p>Is it possible to call some function in <code>.animate</code> event? I have to call <code>resize()</code> function for every resize event on some div.</p>
  
  <p>For an example, I call function on window resize event:</p>
  
  <pre><code>$(window).resize(resize);
  </code></pre>
  
  <p>But now I wish to call this function inside animate event(every changed pixel(like <code>.resize</code> does)).</p>
  
  <pre><code>selector['el']['box'].animate({width:selector['el']['box'].width() - 250}, 500);
  selector['el']['box'].promise().done(function() {resize();});
  </code></pre>
  
  <p>But this is not what I want, because I wish resize function to be called all the time, not only on the end...</p>