0.0.4 • Published 9 years ago

ngkit.smooth-scroll v0.0.4

Weekly downloads
5
License
ISC
Repository
github
Last release
9 years ago

ngKit smooth scroll

Add this directive to anchor links (the ones that start with #) and they'll become magically smooth!

<a href='#section'
   ui-smooth-scroll>
  This link will scroll smoothly
</a>

<div id='section'>
</div>

You can also provide custom animation duration in milliseconds (e.g. ui-smooth-scroll='1000').

How it works?

The default action is prevented and the window.scrollY becomes animated from current position to target element top position.

No additional stylesheets required.

Usage

Add directive to your Angular module directly:

var app = angular.module('myApp', []);

require('ngkit.smooth-scroll')(app);

Note: ngKit requires Browserify.

License

ISC / Boris Okunskiy

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago