waypoints:用于捕获各种滚动事件的插件&&还支持固定元素和无限滚动的功能,功力十分强大。
<script src="jquery.min.js"></script> <script src="waypoints.min.js"></script>$(‘#pointElement‘).waypoint(function(){ notify(‘Basic example callback triggered.‘); //提示内容 });$(‘#pointElement‘).waypoint(function(direction){ notify(‘Direction example triggered scrolling ‘ + direction); }); //这里通知将表现为”Direction example triggered scrolling down”或者”Direction example triggered scrolling up”$(‘#pointElement‘).waypoint(function(){ notify(‘100 pixels from the top‘); },{ offset: 100 });$(‘#pointElement‘).waypoint(function(){ notify(‘25% from the top‘); },{ offset: ‘25%‘ });$(‘#pointElement‘).waypoint(function(){ notify(‘Element bottom hit window top‘); },{ offset: function(){ return $(this).height(); } });原文:http://www.cnblogs.com/ccnNL/p/7707616.html