scrollTop() is not working

scrollTop() is not working

I just want to calculate the scrollTop value in chrome.But i am getting value as 0. Please help me to solve this issue.My google chrome  version is  Version 39.0.2171.95.Below is the my code:
j(document).ready(function(){
 
  if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1)
  {
  var scrollHeight = j("body").scrollTop();
  j("#resultPageMenuBar").hide(); //Hide the result page menu bar
  alert("***************we are inside the google chrome browser***********");
  j("body").scroll(function(){
  var scrolling = j(this).scrollTop();
  alert(scrolling);
  });


  }
});
moreover i am using Jquery 1.7.1