js on element load code example
Example 1: document on load
$(window).on('load', function() {
console.log('All assets are loaded')
})
Example 2: on load javascript
window.onload = (event) => {
console.log('page is fully loaded');
};
$(window).on('load', function() {
console.log('All assets are loaded')
})
window.onload = (event) => {
console.log('page is fully loaded');
};