🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

background-parallax-scroll is an ultra light jQuery plugin which utilizes CSS background-position-y property to apply a basic parallax scrolling effect on your background image.

parallax

Documentation

jquery.background-parallax-scroll

Get started

Install

$ npm install jquery.background-parallax-scroll 

Load scripts

<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script> <script src="/node_modules/jquery.background-parallax-scroll/dist/jquery.background-parallax-scroll.min.js"></script> <link rel="stylesheet" href="/node_modules/jquery.background-parallax-scroll/dist/jquery.background-parallax-scroll.min.css"> 

Setting

<script> jQuery(function($) {   $('.js-bg-parallax').backgroundParallaxScroll({     speed: 3 // Optional   }); }); </script> 
<div class="js-bg-parallax">   <div class="js-bg-parallax__bgimage">     <img src="/path/to/bg.jpg" alt="">   </div>   <div class="js-bg-parallax__content">     Contents   </div> </div> 

License

MIT


You May Also Like