javascript on document ready fuction code example
Example 1: dom ready js
document.addEventListener("DOMContentLoaded", function() {
// code
});
Example 2: ready function jquery
ready function js
document.addEventListener("DOMContentLoaded", function() {
// code
});
ready function js