scrollheight of an element gives undefined value

In an element I've given CSS

overflow: scroll;

. Now in jQuery I want to have it's original height (containing all child elements' height). Children under this element are dynamically changing. I want to have height on scroll event.
Here is the code: