How do i find the pixel value of the bottom of an element (div)
<p>how can i find the pixel value of the bottom of an element. eg. the <code>#posts</code> div. i want to create a infinite scroller. and this is so that i can detect if the user has reached near/at the bottom of the #posts and i want to load new posts if so. </p>

<p><img src="http://img198.imageshack.us/img198/9964/31409868.jpg" alt="alt text"></p>

<p>update:</p>

<p>i guess 1 option is to use </p>

<pre><code>$("#header").height() + $("#posts").height()
</code></pre>

<p>but i want to make the code generic. so maybe i can convert this functionality into a plugin. the code above will not have taken into consideration, padding, margins, any elements above <code>#posts</code> etc.</p>
