Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 822 Bytes

README.md

File metadata and controls

43 lines (32 loc) · 822 Bytes

stellar.js Parallax Scrolling directives for AngularJS

About

This directive is based on stellar.js.

Requirements

  • AngularJS
  • jQuery

Tested on AngularJS 1.0.6, jQuery 1.9.1.

Installation

var app = angular.module('site', ['stellar.directives']);

Usage

in app.js

app.controller('yourCtrl', function($scope, stellar) {
    // The first step is to run .stellar() against the element:
    stellar.against(window);
    // ,
    // stellar.window();
    // or
    // stellar.against('body, .planet, .sun');
})

html directives

<body stellar-background="0.8">
    <div class="planet" stellar="0.8" stellar-hor="0"></div>
    <div class="sun" stellar="1.2" stellar-vert="0"></div>
</body>