Advertisement
Guest User

Lazy Load CSS For 3 CSS Files

a guest
Feb 9th, 2021
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.69 KB | None | 0 0
  1. <script>
  2.   (function () {
  3.     // First Font
  4.     var a = document.createElement("link");
  5.     a.href = "https://googleapis.com/";
  6.     a.rel = "stylesheet";
  7.     a.type = "text/css";
  8.     document.getElementsByTagName("head")[0].appendChild(a);
  9.     // Second Font
  10.     var c = document.createElement("link");
  11.     c.href = "https://googleapis.com/";
  12.     c.rel = "stylesheet";
  13.     c.type = "text/css";
  14.     document.getElementsByTagName("head")[0].appendChild(c);
  15.     // Bootstrap CDN
  16.     var b = document.createElement("link");
  17.     b.href = "https://stackpath.com/";
  18.     b.rel = "stylesheet";
  19.     b.type = "text/css";
  20.     document.getElementsByTagName("head")[0].appendChild(b);
  21.   })();
  22. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement