这篇文章主要介绍了jquery响应滚动条事件功能,可实现针对jquery滚动条状态的实时计算与响应功能,具有一定参考借鉴价值,对jquery感兴趣的朋友可以参考下本篇文章。相关学习推荐:jquery在线视频教程
本文实例讲述了jquery响应滚动条事件功能。分享给大家供大家参考,具体如下:
<!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>无标题文档</title><script type="text/javascript" src="jquery-1.7.2.min.js"></script><script type="text/javascript">$(function() { var lazyheight = 0; //获取数据 function showload() { lazyheight = parsefloat($(window).height()) + parsefloat($(window).scrolltop()); if ($(document).height() - 100 <= lazyheight) { alert("xxx"); } } //showload(); //绑定事件 $(window).bind("scroll", function() { //当滚动条滚动时 showload(); });})</script></head><body><img src="1.jpg"/><br/><img src="2.jpg"/><br/><img src="3.jpg"/></body></html>
相关推荐:
jquery与js实现全选功能区别分享
jquery.form.js的使用详解实例分享
js中的模块化是如何实现的
以上就是jquery响应滚动条事件功能示例的详细内容。