LazyLoad async on demand
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 - 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>
Developer | Andrea Verlicchi |
Username | verlok |
Uploaded | September 08, 2022 |
Rating | 3 |
Size | 1,680 Kb |
Views | 22,264 |
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!
Name | Size |
Circle of dots loading animation - CSS only | 2,975 Kb |
CSS only spinner loading animation | 2,674 Kb |
Chrome-like error page | 2,484 Kb |
URL-encoded SVG as background image | 1,783 Kb |
A Pen by Andrea Verlicchi | 2,547 Kb |
Hiding images without the src attribute | 2,199 Kb |
CSS vars based layout spacing | 0 Kb |
CSS 3 only spinning circle quarter - loading animation | 2,274 Kb |
Grid Resizing with Anchor Points | 3,689 Kb |
Accessible size selection | 2,373 Kb |
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!
Name | Username | Size |
P1 | Vivi_Lai | 1,533 Kb |
Em Test | Rodesco | 1,784 Kb |
SVG Playground | Roygwells | 1,834 Kb |
Free css icon set v2 - one div | Ben_jammin | 0 Kb |
Gradients | Karpovsystems | 2,394 Kb |
Simple animated hover effect | Pobee-norris | 3,044 Kb |
Mega Menu by Joni | Asakasinsky | 3,171 Kb |
Sequence.js - Sliding Horizontal Parallax | Maheshc | 4,537 Kb |
Animate elements with fixed gradient | Badabam | 4,406 Kb |
The Rope | Chribbe | 2,886 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!