Skip to content

EnjoyDigital/ED-Lazy-Load

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

ED Lazy Load

jQuery plugin used to pull items in to the DOM as they scroll in to view - used to keep the initial page size down

###How to use

Include ED Lazy Load

<script src="js/edLazyLoad.min.js"></script>

###Create your items

<div class="container">
    <div class="item"><img src="blank.gif" data-src="my-high-res-image.jpg"></div>
    <div class="item"><img src="blank.gif" data-src="my-high-res-image2.jpg"></div>
    <div class="item"><img src="blank.gif" data-src="my-high-res-image3.jpg"></div>
    <div class="item"><img src="blank.gif" data-src="my-high-res-image4.jpg"></div>
    <div class="item"><img src="blank.gif" data-src="my-high-res-image5.jpg"></div>
</div>

###Initialise the plugin

<script>
$(function(){
	$('.container .item img').edLazyLoad();
});
</script>

About

This plugin loads in images as they scroll in to the viewport to keep the page size down initially

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors