document.ready and document.load code example
Example 1: document ready without jquery
document.addEventListener("DOMContentLoaded", function(event) {
//we ready baby
});
Example 2: javascript document ready
window.onload = function() {
};
document.addEventListener("DOMContentLoaded", function(event) {
//we ready baby
});
window.onload = function() {
};