<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div style="height: 100px; overflow: auto; 100px"> <p>sadda</p> <p>sadda</p> <p>sadda</p><p>sadda</p> <p>sadda</p> <p>sadda</p> <p>sadda</p> <p>sadda</p> <p>sadda</p> <p>sadda</p> <p>sadda</p> <p>sadda</p> </div> <div style="height: 5000px; overflow: auto"></div> <script src="jquery-2.12.4.js"></script>
console.log($(window).scrollTop())
</body> </html>