title: Trigger $(window).scroll();
body: <p>When I call <code>$("body").animate({scrollTop: someValue});</code> I want <code>$(window).scroll(function() { });</code> to be called too. How can I achieve that?</p>
  
  <p>I have tried with <code>$(window).trigger("scroll")</code> and <code>$(window).triggerHandler("scroll")</code> without success.</p>
  
  <p><a href="http://pastebin.com/ewUmmUti" rel="noreferrer">The code</a></p>
  
  <p><strong>EDIT:</strong>
  Problem solved. There was an <code>if</code> in my <code>$(window).scroll(function() { });</code> that caused the problem. </p>