* Element.scrollTo(@element) -> Element * * Scrolls the window so that `element` appears at the top of the viewport. * * This has a similar effect than what would be achieved using * [HTML anchors](http://www.w3.org/TR/html401/struct/links.html#h-12.2.3) * (except the browser'
(element)
| 1256 | * // -> Element |
| 1257 | **/ |
| 1258 | function scrollTo(element) { |
| 1259 | element = $(element); |
| 1260 | var pos = Element.cumulativeOffset(element); |
| 1261 | window.scrollTo(pos.left, pos.top); |
| 1262 | return element; |
| 1263 | } |
| 1264 | |
| 1265 | |
| 1266 | /** |
no test coverage detected