- Overview
- Documents
Simple Parallax is a simple & easy-to-use jQuery parallax background plugin that enables a parallax scrolling effect on your background images.
Source: github.com
Sep 02, 2014 in Animation 3429 views
Simple Parallax is a simple & easy-to-use jQuery parallax background plugin that enables a parallax scrolling effect on your background images.
Source: github.com
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" href="path/path/simpleparallax.css"> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="js/jquery.simpleparallax.js"></script>
2. HTML
<div class="parallax" data-speed="0.5" style="background-image: url(http://lorempixel.com/1920/1600/nature/2);"> ... </div>
3. JAVASCRIPT
$(function(){ $(".parallax").simpleParallax(); });
4. OPTIONS
{ // The value can be overwritten via html5 attribute "data-speed" speed: 0.25, overlay: { // The value can be overwritten via html5 attribute "data-bg-color" bgColor: "rgba(0, 0, 0, 0)", // The value can be overwritten via html5 attribute "data-overlay-opacity" opacity: 0.5, // The value can be overwritten via html5 attribute "data-overlay-class" overlayClass: false } }
Tagged with:
simple parallax
jquery plugin
parallax
parallax background
scrolling effect
parallax effect
background images
Related Articles