30 May 2016
$( document ).ready(function() {
    window.addEventListener('scroll', detectTop, false);
}

function detectTop() {
 if (window.pageYOffset < 1) {
    //   console.log("inside detectTop");
  }
}