* Scroll page to current anchor in url-hash * * @param hash
(hash)
| 988 | * @param hash |
| 989 | */ |
| 990 | function scrollToAnchorId(hash) { |
| 991 | var target = document.getElementById(hash = (hash || '').replace(/^#/, '')); |
| 992 | if (target && target.id === hash && target.nodeName === "A") { |
| 993 | var rect = target.getBoundingClientRect(); |
| 994 | global.scrollTo((documentElement.scrollLeft || 0), rect.top + (documentElement.scrollTop || 0) |
| 995 | - (documentElement.clientTop || 0)); |
| 996 | } |
| 997 | } |
| 998 | |
| 999 | /** |
| 1000 | * Library initialization |
no outgoing calls
no test coverage detected