LazyLoad async on demand

Size
1,680 Kb
Views
22,264

How do I make an lazyload async on demand?

What is a lazyload async on demand? How do you make a lazyload async on demand? This script and codes were developed by Andrea Verlicchi on 08 September 2022, Thursday.

LazyLoad async on demand Previews

LazyLoad async on demand - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>LazyLoad async on demand</title>
</head>
<body> <script> function loadjscssfile(filename, filetype){ if (filetype=="js"){ //if filename is a external JavaScript file var fileref=document.createElement('script') fileref.setAttribute("type","text/javascript") fileref.setAttribute("src", filename) } else if (filetype=="css"){ //if filename is an external CSS file var fileref=document.createElement("link") fileref.setAttribute("rel", "stylesheet") fileref.setAttribute("type", "text/css") fileref.setAttribute("href", filename) } if (typeof fileref!="undefined") document.getElementsByTagName("head")[0].appendChild(fileref)
}
</script>
<button type="button" onclick="myclick()">Click here~!</button>
<script type="text/javascript"> function myclick(){ loadjscssfile("https://rawgit.com/verlok/lazyload/feature/asyncInit/src/lazyload.js", "js") }
</script>
<img data-lazysrc="https://raw.githubusercontent.com/verlok/lazyload/feature/asyncInit/img/44704882BQ_11_a.jpg" />
<script> window.asyncLazyLoadOptions = { throttle: 150, skip_invisible: false, threshold: 150, data_src: 'lazysrc', data_srcset: 'lazyset' };
</script>
</body>
</html>
LazyLoad async on demand - Script Codes
LazyLoad async on demand - Script Codes
Home Page Home
Developer Andrea Verlicchi
Username verlok
Uploaded September 08, 2022
Rating 3
Size 1,680 Kb
Views 22,264
Do you need developer help for LazyLoad async on demand?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Andrea Verlicchi (verlok) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!