In this snippet
Lets assume th
If you had the below code and didn't want your alert('hi') to fire until all scripts have downloaded, you can wait for the document ready event. You can do this using jQuery, or with vanilla JavaScript.
To defer until all scripts have loaded using jQuery:
$( document ).ready( function () {
alert('hi');
});