jQuery Async

Memuat jQuery Dengan Asinkron
Daftar Isi Artikel []
Cara memasang jQuery dengan pemuatan asinkron pada dokumen HTML.

jQuery Dalam Kepala Dokumen

<!DOCTYPE html>
<html>
<head>
    <title>Memuat Skrip jQuery Dalam Kepala Dokumen</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.2.3/jquery.min.js">
</head>

<body>

</body>
</html>

jQuery Dengan Asinkron

<!DOCTYPE html>
<html>
<head>
    <title>Memuat Skrip jQuery Dengan Asinkron</title>

<script>
//<![CDATA[
var async = async || [];
(function () {
    var done = false;
    var script = document.createElement("script"),
    head = document.getElementsByTagName("head")[0] || document.documentElement;
    script.src = 'https://cdnjs.cloudflare.com/ajax/libs/jquery/1.2.3/jquery.min.js';
    script.async = true;
    script.onload = script.onreadystatechange = function() {
        if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
            done = true;
            while(async.length) { 
                var obj = async.shift();
                if (obj[0] =="ready") {
                    $(obj[1]);
                }else if (obj[0] =="load"){
                    $(window).load(obj[1]);
                }
            }
            async = {
                push: function(param){
                    if (param[0] =="ready") {
                        $(param[1]);
                    }else if (param[0] =="load"){
                        $(window).load(param[1]);
                    }
                }
            };
            script.onload = script.onreadystatechange = null;
            if (head && script.parentNode) {
                head.removeChild(script);
            }
        }
    };
head.insertBefore(script, head.firstChild);
})();
//]]>
</script>
</head>

<body>
</body>
</html>
Sumber: https://idiallo.com/javascript/async-jquery