what is use of $(document).ready(function() code example
Example 1: jquery document ready
// jQuery document ready
$(document).ready(function() {
});
Example 2: dom ready js
document.addEventListener("DOMContentLoaded", function() {
// code
});