终于,我开始工作了。真的很简单:
var $layer = $("#layer");$layer.bind('touchstart', function (ev) { var $this = $(this); var layer = $layer.get(0); if ($this.scrollTop() === 0) $this.scrollTop(1); var scrollTop = layer.scrollTop; var scrollHeight = layer.scrollHeight; var offsetHeight = layer.offsetHeight; var contentHeight = scrollHeight - offsetHeight; if (contentHeight == scrollTop) $this.scrollTop(scrollTop-1);});
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)