plain js document ready code example
Example 1: js vanilla dom ready
document.addEventListener("DOMContentLoaded", function() {
// code
});
Example 2: javascript document ready
window.onload = function() {
};
document.addEventListener("DOMContentLoaded", function() {
// code
});
window.onload = function() {
};