<title>jQuery Demo example</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js">
<script type="text/javascript">
$(document).ready(function(){
$( "#scrollTopExample" ).on( "click", function(event) {
var x = $("#myDiv").scrollTop();
<h4 ><a href="javascript:void(0);" id="scrollTopExample">Click to run .scrollTop() Example </a></h4>
<div id="myDiv" class="myClass">
Scroll left Demo..content.. Scroll left Demo..content.. Scroll left Demo..content.. Scroll left Demo..content.. Scroll left Demo..content.. Scroll left Demo..content.. Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..Scroll left Demo..content..