Wide browser support
Easy set-up
Customizable parallax settings
No jQuery needed
Notes
Playground
justParallax.js is a lightweight javascript plugin which allows users to make the background of their webpage have a subtle parallax effect with just 2 lines of code.
justParallax.js is also fully customizable and does not depend on any Javascript library to function.
Click the background to change it.
justParallax.js supports all major browsers including IE7+, Google Chrome, Mozilla Firefox, Safari, Opera and many more.
Get justParallax.js up and running in just 4 easy steps.
justParallax.js supports multiple customizations, here is a list of all options and it's default values.
You only have to define the settings in the variable that you want to change. All undefined settings will fall back to their default setting.
- <script src='./js/justParallax.js' type='text/javascript'><script>
- <script>
- //Default settings
- speed: 8; //The speed of the scrolling background, 1 is faster than 10.
- vertical: true; //Set to true if the background should scroll vertically.
- vertical_inversed: false; //Set to true if the vertical direction should be inversed.
- horizontal: true; //Set to true if the background should scroll horizontally.
- horizontal_inversed: false; //Set to true if the horizontal direction should be inversed.
- //An example of the usage of justParallax.js
- var settings = {
- speed: 5,
- vertical: true,
- vertical_inversed: true,
- horizontal: true,
- horizontal_inversed: false
- };
- initParallax(settings);
- </script>
justParallax.js works with plain Javascript which gives the best performance and doesn´t need jQuery or any other Javascript library to function.
justParallax.js is merely a tool to achieve a great website, here are some tips and tricks about how to use the tool.
Click the background to change it.
Option | Setting |
---|---|
Speed: | |
vertical: |
|
vertical_inversed: |
|
horizontal: |
|
horizontal_inversed: |
|