jqury scrollTop code example
Example 1: jquery get document scrolltop
var top = ($(window).scrollTop() || $("body").scrollTop());
Example 2: jquery scrollHeight
$('#test')[0].scrollHeight
var top = ($(window).scrollTop() || $("body").scrollTop());
$('#test')[0].scrollHeight