0.1.4 • Published 7 years ago

@la-haute-societe/lhs-parallax v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Deprecation warning

This package has been renamed to @lahautesociete/parallax.

LHS Parallax

LHS Parallax plugin to make parallax animation when scrolling.

Installation

npm install @la-haute-societe/lhs-parallax

Usage

HTML

Create an HTML element with the scroll-level attribute.

You can pass two attributes to your element :

  • scroll-level - Parallax level (required)
  • scroll-direction - Parallax direction (optional) : x / y (default y),
<div class="myElement" scroll-level="3" scroll-direction="x"></div>

JavaScript

Import LhsParallax where you want to use it.
Then get the HTML element and create an instance of LhsParallax passing your element in parameter.

import LhsParallax from '@la-haute-societe/lhs-parallax';
var myElement = document.querySelector('.myElement');
var scroll = new LhsParallax(myElement);
0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago