Skip to content
A customizable parallax scrolling effect for es5.
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
demo FIX css
src NEW test init method
test
.gitignore
.travis.yml NEW .travis.yml file, DOC updated readme
Gruntfile.js NEW scaffolding
LICENSE NEW license
README.md DOC updated readme
bower.json NEW .travis.yml file, DOC updated readme
karma.conf.js NEW unit test starter
package.json FIX package.json

README.md

Build Status

stereoscope.js 0.1.0

A customizable parallax scrolling effect for es5.

Installation

Basic

git clone git@github.com:stephanepericat/stereoscope.js.git

Via Bower

bower install stereoscope.js

Usage

See the demo files for an example on how to setup the html / css.

Basic

<script src="src/stereoscope.js"></script>
<script>
    Stereoscope.init({
        attributes: {
            type: 'data-type',
            speed: 'data-speed'
        },
        backgroundId: 'background',
        backgroundDOMElement: 'section'
    });
</script>

With Require.js

require(['src/stereoscope'], function() {
    Stereoscope.init({
        attributes: {
            type: 'data-type',
            speed: 'data-speed'
        },
        backgroundId: 'background',
        backgroundDOMElement: 'section'
    });
});

Options

  • attributes: {Object} the type & speed attributes
  • attributes.type: {String} the name of the type attribute
  • attributes.speed: {String} the name of the speed attribute
  • backgroundId: {String} the value of the type attribute
  • backgroundDOMElement: {String} the type of dom node for backgrounds

Test

npm install
npm test
Something went wrong with that request. Please try again.