Last active
December 19, 2015 04:59
-
-
Save paulo72/5901510 to your computer and use it in GitHub Desktop.
Make a queue for $ so we can start calling jquery without worrying whether its there at all. We'll pop the queue once we know jquery is loaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| Make a queue for $ so we can start calling jquery without | |
| worrying whether its there at all. We'll pop the queue once we know | |
| jquery is loaded. | |
| Put this bit in the head | |
| --> | |
| <script type='text/javascript'>window.q=[];window.$=function(f){q.push(f)}</script> | |
| <!-- ... and this bit before the closing body tag, after jQuery is loaded ... --> | |
| <script type="text/javascript">$.each(q,function(i,f){$(f)})</script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment