Ruby's Louvre

每天学习一点点算法

导航

2011年3月1日 #

我的模块加载系统 v4

摘要: 本版本增加了如下特征: 对加载失败时的负向回调支持。由于opera在处理请求无效地址时发出的是致命错误,不能给onerror等捕捉,因此我的负向回调是对它没作用的(测试浏览器为opera11)。但能实现在IE下对script.onerror的模拟,这是我的加载器相对于其他加载器最大的优势,也是本版本最大的亮点。 dom.require(dependList,callback,/*optional*/errback) //依赖列表,正向回调,负向回调 如果请求地址无效,会立即中止定时器,防止... 阅读全文

posted @ 2011-03-01 22:08 司徒正美 阅读(3192) 评论(6) 推荐(2) 编辑

自定义滚动条(webkit系列)

摘要: Thumb: 滚动条里面的小方块,能向上向下移动(或往左往右移动,取决于是垂直滚动条还是水平滚动条)。This is the piece that shows you where you are in the scrollbar. This is the chap that you can move aroundTrack: 滚动条的轨道(里面装有Thumb)。This is the area of the scrollbar that you can move the thumb up and down, or along (depending on the orientation). Th 阅读全文

posted @ 2011-03-01 16:16 司徒正美 阅读(11349) 评论(0) 推荐(0) 编辑