DOM Enlightenment Book

by domenlightenment

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<script async src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js"></script>
<!-- Don't block, just start downloading and then parse the file when it's done downloading -->


<script async src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<!-- Don't block, just start downloading and then parse the file when it's done downloading -->

<script async src="http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"></script>
<!-- Don't block, just start downloading and then parse the file when it's done downloading -->

<script>
// we have no idea if jQuery has been loaded yet
console.log(window['jQuery'] === undefined);

//Only after everything is loaded can we safley conclude that jQuery was loaded and parsed
document.body.onload = function(){console.log(jQuery().jquery)}    
</script>