()
| 4822 | } |
| 4823 | |
| 4824 | function getYOffset() { |
| 4825 | |
| 4826 | var offset = scroll.yOffset; |
| 4827 | |
| 4828 | if (isFunction(offset)) { |
| 4829 | offset = offset(); |
| 4830 | } else if (isElement(offset)) { |
| 4831 | var elem = offset[0]; |
| 4832 | var style = $window.getComputedStyle(elem); |
| 4833 | if (style.position !== 'fixed') { |
| 4834 | offset = 0; |
| 4835 | } else { |
| 4836 | offset = elem.getBoundingClientRect().bottom; |
| 4837 | } |
| 4838 | } else if (!isNumber(offset)) { |
| 4839 | offset = 0; |
| 4840 | } |
| 4841 | |
| 4842 | return offset; |
| 4843 | } |
| 4844 | |
| 4845 | function scrollTo(elem) { |
| 4846 | if (elem) { |
no test coverage detected