Skip to content

mu-lib/mu-afq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mu-afq

Asynchronous Function Queue

Usage

First of you should add the afq oneliner in the top of you page, preferably in the HEAD tag

<script>
window.afq = window.afq || function () { (afq.q = afq.q || []).push(arguments) };
</script>

Now you are ready to load the script

<script src="afq.js" async="true"></script>

After that call your methods like so :

afq("methodName", 1, 2, 3);

Methods are provided like so :

afq("provide", "methodName", function(a, b, c) {});