2.0.4 • Published 5 years ago

parlx.js v2.0.4

Weekly downloads
25
License
MIT
Repository
github
Last release
5 years ago

parlx.js

JavaScript & jQuery parallax effect plugin

Usage

At the beginning connect the library with Your project:

using script tag in HTML:

<script src="/directory/to/library/folder/parlx.js"></script>

or via command line and CommonJS/ES6 import:

npm install parlx.js // npm
yarn add parlx.js // yarn
const Parlx = require('parlx.js'); // CommonJS
import Parlx form 'parlx.js'; // ES6

Vanilla JavaScript e.g:

const elems = document.querySelectorAll('.parallax');
const parlx = new Parlx(elems, {
  // options...
});

or jQuery e.g: Connect jQuery in HTML

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

or include via command line and CommonJS

npm install jquery // npm
yarn add jquery // yarn
bower install jquery // bower
const jQuery = require('jquery');

and call plugin on element

$('.parallax').parlx({
  // options...
});

Plugin supports autoinit To use it, add data-parlx to html element e.g:

<div data-parlx></div>

Options

NameTypeDefaultDescriptionAvailable options
directionstringverticalparallax element move directionvertical, horizontal, diagonal
typestringbackgroundtype of parallaxforeground (div move), background (inner image move)
speednumber0.3parallax speedvalues >= -0.5 and 0.5 >=
heightstring400pxHeight of parallax effect containere.g: 500px, 70vh
mobilebooleantrueEnable or disable parallax effect on mobile devicesEnable true, disable false

License

This project is licensed under the MIT License

3.0.0-beta.3

5 years ago

3.0.0-beta.2

5 years ago

3.0.0-beta.1.1

5 years ago

3.0.0-beta.1

5 years ago

1.4.5

5 years ago

1.4.4

5 years ago

1.4.3

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.4.2

5 years ago

2.0.0-beta.2

5 years ago

2.0.0-beta.1

5 years ago

1.4.1

6 years ago

1.4.1-beta.0

6 years ago

1.4.0

6 years ago

1.4.0-beta.2

6 years ago

1.4.0-beta.1

6 years ago

1.3.1

6 years ago

1.3.1-beta.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.2.0-beta.2

6 years ago

1.2.0-beta.1

6 years ago

1.1.0

6 years ago

1.1.0-rc.1

6 years ago

1.1.0-beta.4

6 years ago

1.1.0-beta.3

6 years ago

1.1.0-beta.2

6 years ago