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