Trues, у тебя явно проблемы с пониманием происходящего в браузере...
Еще один пример для тебя...
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' />
<script src='http://code.jquery.com/jquery-latest.js'></script>
<!--
<script src="https://code.angularjs.org/1.3.9/angular.min.js"></script>
<script src="https://code.angularjs.org/1.3.9/angular-route.js"></script>
<link rel='stylesheet type=text/css href=tmp.css' />
<link rel="stylesheet/less" type="text/css" href="style.less">
<script src="http://cdnjs.cloudflare.com/ajax/libs/less.js/2.5.0/less.min.js"></script>
-->
<style type='text/css'>
html,
body {
height: 4000px;
}
#info {
position: fixed;
top: 10px;
right: 10px;
width: 100px;
}
.scroll-bot {
position: absolute;
top: 1500px;
left: 100px;
width: 200px;
border: 1px solid;
}
</style>
<script type='text/javascript'>
$(function(){
var ok=true;
$(document).scroll(function(){
var div_top=parseInt($('.scroll-bot').offset().top);
var div_h=$('.scroll-bot').height();
var scrl_top=parseInt($(this).scrollTop());
var win_h=$('.scroll-bot').parent().parent().get(0).clientHeight;
$('#div_top').text(div_top);
$('#scrl_top').text(scrl_top);
$('#win_h').text(win_h);
if(ok&&((div_top+div_h)-scrl_top)<win_h){
alert('Привет');
ok=false;
}
});
});
</script>
</head>
<body>
<div id='info'>
<p id='scrl_top'></p>
<p id='win_h'></p>
<p id='div_top'></p>
</div>
<div class='scroll-bot'>scroll-bot</div>
</body>
</html>