Skip to content

Instantly share code, notes, and snippets.

@DmitriyRF
Created June 19, 2018 13:55
Show Gist options
  • Save DmitriyRF/05e4d26a2265692dd18065b76bd2c44d to your computer and use it in GitHub Desktop.
Save DmitriyRF/05e4d26a2265692dd18065b76bd2c44d to your computer and use it in GitHub Desktop.
Standard js wrapper
"use strict";
document.addEventListener("DOMContentLoaded", function(event){
// - Code to execute when all DOM content is loaded.
// - including fonts, images, etc.
});
window.addEventListener('load', function() {//Update March 2017
console.log('All assets are loaded');
})
window.onload = function() {
};
// LINKS
// https://developer.mozilla.org/en-US/docs/Web/API/Window#Event_handlers
// jQuery
jQuery.noConflict();
(function( $ ){
$(function() {
// Handler for .ready() called.
});
//or
$( document ).ready(function() {
// Handler for .ready() called.
});
$( window ).load(function() {
// Run code when page is fully loaded including graphics
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment