Graviton.js is an open-source simple and efficient JavaScript front-end library to add a cool Parallax effect to your projects.
You have two ways to add Graviton into your project.You can install Graviton via npm with:
npm install graviton.js
If you dont want to install node dependencies, you can also manually add graviton.js script by downloading the JavaScript file "graviton.min.js" and including it in your project.
To start using Graviton.js, add your element the "graviton" class, and include a "data-gravity" atribute. This atribute goes from -10 to 10 (default or 0 = 3). Example:
<h1 class="graviton" data-gravity="3">Hi Graviton!</h1>
If you find bugs, improvements or new ideas, feel free to modify this repository.
- Fork this repository.
- Make your changes on the base file (graviton.js).
- Minify your code and substitute "graviton.min.js" file.
- Make a pull request.