I need a way to automatically find the maximum bottom value of scrollTop, of the div id \"#box\".
Something like this: How to get maximum document scrolltop value
Here's a version that accounts for padding and uses prop instead of accessing the DOM element directly.
prop
$('#box').prop('scrollHeight') - $('#box').innerHeight();