Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pinchnzoom/pz-animate-scroll
Angular 1.x directive version of animatescroll.js
https://github.com/pinchnzoom/pz-animate-scroll
angular1 angularjs angularjs-directives animated scroll scrolling scrollview scrollview-component
Last synced: about 2 months ago
JSON representation
Angular 1.x directive version of animatescroll.js
- Host: GitHub
- URL: https://github.com/pinchnzoom/pz-animate-scroll
- Owner: pinchnzoom
- Created: 2017-02-16T23:16:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-07T23:18:14.000Z (almost 8 years ago)
- Last Synced: 2024-10-12T08:42:09.477Z (3 months ago)
- Topics: angular1, angularjs, angularjs-directives, animated, scroll, scrolling, scrollview, scrollview-component
- Language: JavaScript
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pz-animate-scroll - Animatescroll.js as an Angular Directive
## pz-animate-scroll was designed...
To what: Allow a quick plugin for smooth scrollingTo how: By cutting down on DOM traversal, starting from the calling element
To why: Because animatescroll is cool.
### Installation
In your Angular project, run `bower install --save pz-animate-scroll` to save the
module. Then, in your HTML, add (if bower doesn't do it for you...):``` html
```
And nextly, in your Angular module, include `pz.animateScroll` as a dependency:
``` javascript
angular.module('my-app', ['pz.animateScroll'])
```And afterthatly, add the 'page-container' HTML attribute id to the top-level element you want to be scrollable (if you have a fixed sidebar aside, and a section element, put it in the section element)
``` html```
And Lastly, in the element you want to scroll FROM, add the pz-animate-scroll attribute directive with space-separated 2 params:
Param1 is the id of the scroll-to target
Param2 is the delay of the scroll in milliseconds
``` html
```
** This plugin adds an on.click event to this element.