2.1.2 • Published 6 years ago

goodparallax v2.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

GoodParallax

Very simple and easy to use parallax animation plugin.

Demo

Play with demo here: Demo

Features

  • Smooth work;
  • Very easy to set up and play;
  • No jQuery. Plugin has been coded on pure JavaScript;
  • Mobile phone support

How to use

  • just include the plugin to your project...
<script src="dist/good-parallax.min.js"></script>
  • init the plugin
new GoodParallax().init();
Next, we need to add class .parallax to an element and provide a link for your image:
 <section class="parallax" data-img="img/path_to_your_image"></section>
You can use package managers to install the plugin:
  • From NPM:
npm install GoodParallax

Customize The Plugin

You can change the parallax speed or use different class.

// Plugin customization
new GoodParallax().init({
    speed: 8.0
});
Avalaible Options
KeyDefault valueDescription
speed5.0Set the parallax animation speed. Higher number - slower effect
classNameparallaxUse your own class for parallax animation

Some tips and recomendations

  • You can skip the data-img attribute and add the image via backgroud-image property from CSS. That's more proper way either js blocks the image rendering
  • Compress and shrink your images. In my opinion, FullHD is enough for size.
  • For mobile devices are more properly to include image with more smaller size, for example, not more than 768px by width.

Hope you like it :)

2.1.2

6 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago