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

bglazyload.js is a super simple jQuery plugin used to delay loading of images until container is scrolled more than 33% in viewport.

lazy-load background-image

Documentation

Lazy Load Background Images

Simple JQuery plugin to lazy load background images

#How to Use?

Include jQuery and Lazy load plugin before closing body tag:

<script src="jquery.min.js" type="text/javascript"></script> <script src="jquery.bglazyload.js" type="text/javascript"></script>

Add container's background image path in "data-bgimage" data attribute

<div class="lazy" data-bgimage="img/bg.jpg" width="600" height="450" >

then initialise using

$("div.lazy").lazyload();

View Demo

##Installing Via Bower

bower install bg-lazy-load --save-dev

You May Also Like