![]() Scrolls to specified position in either axis, with optional animation.scrollTopAnimated|scrollLeftAnimated( top ] )Ĭonvenience function like scrollToElementAnimated but for scrollTop/ scrollLeft. Returns current scroll position.scrollTop|scrollLeft( top ] ) Works exactly the same as scrollToElement but uses the default values from duScrollOffset, duScrollDuration and duScrollEasing unless otherwise specified.scrollTop|scrollLeft( ) Scrolls to the specified element, if offset is passed it will be subtracted from the elements position which is good if one uses floating menus.scrollToElementAnimated( element ] ] )Ĭonvenience function. scrollToElement.scrollToElement( element ] ] ) If easing is ommited the animation will default to the duScrollEasing function.scrollTo( element ] ] )Īlias of. If duration is specified the scrolling is animated for n milliseconds. ![]() Scrolls the element/window to the specified left/top position. In case of name collisions existing jQuery or jqlite functions will be preserved, just use the prefixed version: ie. Note that $document is an angular.element, for usage example see below. This module extends the angular.element object with a few jQuery like functions. If you prefer a CDN hosted version (which might speed up your load times), check out /libraries/angular-scroll.ĭon't forget to add duScroll to your module dependencies. You can also download the production version or the development version. With npm (for use with browserify): $ npm install angular-scroll Install With bower: $ bower install angular-scroll ExampleĬheck out the live demo or the source code.
0 Comments
Leave a Reply. |