execute when div reaches position
<p>I have a function that moves a box from right to left of a page on click. When the div starts to exit the window and thus has a negative position based on my function, I would like to fire an event. I however get no response when the div passes the edge of the left side of the screen. Anyone have any ideas? </p>

<p>I know the position <code>($('#container').position().left/$(document).width())*100)</code> is defined and if I changed &lt;0 to >0 when the page is initially loaded, the alert will fire.</p>

<pre><code>&lt;script&gt;
$("#play").live('click', function() {
  $("#container").animate({"left": "-=100%"}, 25000);
});
if (($('#container').position().left/$(document).width())*100&lt;0){
    alert('test');
}
&lt;/script&gt;  
</code></pre>
