<script> var scrollFunc = function (e) { var direct = 0; e = e || window.event; if (e.wheelDelta) { //判断浏览器IE,谷歌滑轮事件 if (e.wheelDelta > 0) { //当滑轮向上滚动时 alert("滑轮向上滚动"); } if (e.wheelDelta < 0) { //当滑轮向下滚动时 alert("滑轮向下滚动");
var scrolltop = new Array(); var index = 0; scrolltop[0] = 0; $(document).scroll(function(){ index ++; scrolltop[index] = $(document).scrollTop(); if (scrolltop[index] > scrolltop[index-1]) { console.log("scroll down"); }else{ console.log(&qu
UITableView is a subclass of UIScrollView, and UITableViewDelegate conforms to UIScrollViewDelegate. So the delegate you attach to the table view will get events such asscrollViewDidScroll:, and you can call methods such as contentOffset on the table