Press "Enter" to skip to content

Jquery Plugin To Handle Scenarios Where Loading Images Too Fast | jquery.lazyrate.js

jquery.lazyrate.js is a Jquery plugin designed to load images with a delay in between, to deal with scenarios where loading images too quickly causes rate limiting issues.

lazyrate.js is a jQuery extension that provides a unique way to delay loading a series of images into a document. It can be used to prevent rate problems caused by images that load too quickly.

How to make use of it:

1. Place the jquery.lazyrate.js script after loading jQuery.

<script src="/path/to/cdn/jquery.slim.min.js"></script>
<script src="/path/to/jquery.lazyrate.js"></script>

2. Add placeholder photos to the web page and specify the actual path of your photos utilizing the data-src attribute.

<img id="img01" 
     data-src="1.jpg" 
     src="placeholder.png" 
     class="lazyrate" />
<img id="img02" 
     data-src="2.jpg" 
     src="placeholder.png" 
     class="lazyrate" />
<img id="img03" 
     data-src="3.jpg" 
     src="placeholder.png" 
     class="lazyrate" />
<img id="img04" 
     data-src="4.jpg" 
     src="placeholder.png" 
     class="lazyrate" />
<img id="img05" 
     data-src="5.jpg" 
     src="placeholder.png" 
     class="lazyrate" />

3. Call the function on the pictures and decide the delay in milliseconds.

$(document).ready(function () {
  $(".lazyrate").lazyRate({
    delay: 1000
  });
});

Delay Image Loading To Prevent Rate Limiting, jquery.lazyrate.js Plugin/Github

jquery-lazy-rate-js


See Demo And Download

Official Website(kjlibsol): Click Here

This superior jQuery/javascript plugin is developed by kjlibsol. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *