Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

LazyLoad for images, Videos and Iframes JavaScript and JQuery

<script src="lazysizes.min.js" async=""></script>
<!-- Image LazyLoad -->
<img data-src="image.jpg" class="lazyload" />
  
  <!-- Image LazyLoad -->
  <img
    data-sizes="auto"
    data-src="image2.jpg"
    data-srcset="image1.jpg 300w,
    image2.jpg 600w,
    image3.jpg 900w" class="lazyload" />

<!-- Iframe LazyLoad -->
<iframe frameborder="0"
	class="lazyload"
    allowfullscreen=""
    data-src="//www.youtube.com/embed/ZfV-aYdU4uE">
</iframe>
 
PREVIOUS NEXT
Tagged: #LazyLoad #Videos #Iframes #JavaScript #JQuery
ADD COMMENT
Topic
Name
6+2 =