jQuery - div has reached top of page #jquery
var distance = $('div').offset().top
$window = $(window)
$window.scroll(function () {
if ( $window.scrollTop() >= distance ) {
// Your div has reached the top
console.log('Your div has reached the top')
}
})