js ready event code example
Example 1: document ready without jquery
document.addEventListener("DOMContentLoaded", function(event) {
//we ready baby
});
Example 2: jquery doc on ready
$(document).ready(() => {
console.log('ready');
});
document.addEventListener("DOMContentLoaded", function(event) {
//we ready baby
});
$(document).ready(() => {
console.log('ready');
});