scrollheight of an element gives undefined value
<p>In an element i've given CSS, overflow:scroll;
Now in jquery i want to have its original height (Containing all child element height). Children under this elements are dynamically changing. I want to have height on scroll event.
Here is the code:</p>

<pre><code>$("#container").scroll(function(e) {
    scrollAll();
});

function scrollAll(){
    var elemHeight = $("#container").scrollHeight;
    var scrollHeight = $("#scrollbars").scrollHeight;
    var ratio = elemHeight / scrollHeight;

    $("#outup").html( elemHeight +" and "+ scrollHeight +" ratio "+ ratio +" = "+ ($("#container").scrollTop()));
}
</code></pre>

<p>Issue: It throws scrollHeight as undefined. What's wrong?</p>
