Detect scroll on bottom on iphone
<p>I want to detect if i'm at the bottom of a page. This works fine on any browser - but not on iPhone.</p>

<pre><code>if ($(window).scrollTop() == ($(document).height() - $(window).height())){
alert('on bottom'); 
}
</code></pre>

<p>What i'm doing wrong?</p>
