摘要:
jQuery(window).height()代表了当前可见区域的大小,而jQuery(document).height()则代表了整个文档的高度,可视具体情况使用. 注意当浏览器窗口大小改变时(如最大化或拉大窗口后) jQuery(window).height() 随之改变,但是jQuery(document).height()是不变的。$(document).scrollTop() 获取垂直滚动的距离 即当前滚动的地方的窗口顶端到整个页面顶端的距离$(document).scrollLeft() 这是获取水平滚动条的距离要获取顶端 只需要获取到scrollTop()==0的时候 就是顶.. 阅读全文
posted @ 2014-02-06 16:35
xiezhenzhong
阅读(343)
评论(0)
推荐(0)
摘要:
看过goole closure 的同学都知道 其中定义一个类名函数时候只要 inlude("") 想加载某个模块只要require("")就可以利用:下面给出一个例子: 分模块加载 View Code 阅读全文
posted @ 2014-02-06 16:05
xiezhenzhong
阅读(250)
评论(0)
推荐(0)
摘要:
$E.on = function (o, e, f) { return o.addEventListener ? o.addEventListener(e, f, false) : o.attachEvent('on'+e, function () { f.call(o) });};$E.on(document.getElementById('dele-ul'), 'click', function (e) { var tar = e.target || e.srcElement; if (tar.nodeName.toLowerCase() = 阅读全文
posted @ 2014-02-06 15:23
xiezhenzhong
阅读(286)
评论(0)
推荐(0)

浙公网安备 33010602011771号