优化滚动距离获取
parent
77145c5561
commit
82a448ea0f
|
@ -97,8 +97,8 @@ define(['yua'], function(){
|
|||
dy = cst[5]
|
||||
|
||||
//滚动条的偏移
|
||||
bst = document.body.scrollTop
|
||||
bsl = document.body.scrollLeft
|
||||
bst = document.documentElement.scrollTop
|
||||
bsl = document.documentElement.scrollLeft
|
||||
|
||||
// 计算元素的offset值, 需要修正
|
||||
ox = offset.left - dx - bsl
|
||||
|
|
Reference in New Issue