You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

goodparallax

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

goodparallax

Very simple and easy to use parallax animation plugin.

2.1.2
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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();
 <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 :)

Keywords

parallax

FAQs

Package last updated on 08 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts