Lightweight Image Parallax Scrolling with jQuery - Mini Parallax

File Size: 7.91 KB
Views Total: 2969
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Lightweight Image Parallax Scrolling with jQuery - Mini Parallax

A small and fast jQuery plugin that adds parallax scrolling effects to background images (or absolute positioned images) using Window.requestAnimationFrame() method.

How to use it:

1. Load the jQuery Mini Parallax plugin after loading jQuery JavaScript library.

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

2. Add a background parallax image into your content section.

.section {
  height: 500px;
  background: url(1.jpg) no-repeat 50% 50%;
  background-size: cover;
}

3. Call the plugin and done.

$('.section').miniParallax();

4. Default parameters.

$('.section').miniParallax({
  inset : 1,
  speed : 0.5
});

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