jQuery Plugin For Vertical & Horizontal Parallax Effects

jQuery Plugin For Vertical & Horizontal Parallax Effects
File Size: 6.88 MB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A jQuery plugin inspired by IanLunn's jQuery Parallax that makes it easier to apply horizontal or vertical parallax scrolling effects on multiple DOM elements.

How to use it:

1. Load the jQuery Simple Parallax plugin after jQuery JavaScript library.

<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="js/jquery.parallax-1.1.4.js"></script>

2. Call the plugin on DOM element and setup the initial position & speed factor.

// for parallax background images
$('#section1').parallax('background-position-y', -0.01);
$('#section2').parallax('background-position-y', 0.01);
$('#section3').parallax('background-position-x', 0.01);

// for parallax elements
$('#link1').parallax('margin-left', 0.3);
$('#link2').parallax('margin-left', -0.2);
$('#link3').parallax('margin-left', -0.1);

3. Plugin parameters.

  • margin-top
  • margin-left
  • margin-right
  • background-position-x
  • background-position-y
  • height

Change log:

2015-04-28

  • fix background x y bug for firefox

This awesome jQuery plugin is developed by YanshuoH. For more Advanced Usages, please check the demo page or visit the official website.