angular-scrollto

0.1.4 • Public • Published

angular-scrollto

Angular directive to scroll to element by selector.

Requires jQuery. Soon, there will be a non-jQuery version as well.

Install

Bower

bower install angular-scrollto --save

NPM

npm install angular-scrollto --save

Usage

Inject module

angular.module('myApp', ['scrollto']);

Use as directive

<a href="" scroll-to="#element" offset="0" container="window">Go to element</a>
 
<div id="element">
  You will scroll to me
</div>

Options

scroll-to

Requred

Element to scoll to when current element is clicked.

offset

Default value: 0

Number of pixels to offset from the top.

duration

Default value: 150

Length of time, in milliseconds, the animation will take.

container

Default value: window

The container element to scroll.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.4
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.4
    5
  • 0.1.3
    1
  • 0.1.2
    1
  • 0.1.1
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i angular-scrollto

Weekly Downloads

7

Version

0.1.4

License

MIT

Last publish

Collaborators

  • scottcorgan