Получить текущую высоту прокрутки JavaScript
document.documentElement.scrollTop || document.body.scrollTop
Tony Blunt
document.documentElement.scrollTop || document.body.scrollTop
$('#test')[0].scrollHeight
$('#myDiv').prop('scrollHeight')
Syntax
Trigger the scroll event for the selected elements:
$(selector).scroll()
Attach a function to the scroll event:
$(selector).scroll(function)
$('#leave-reason-input').keyup(function() {
var height = $(this).scrollTop();
var initHeight = 5;
if(initHeight < height ) {
$(this).css({'height':'8rem'});
}
})