run a function after div with id is loaded code example
Example: call javascript function after div load
document.querySelector('img.my-image').addEventListener('load', function(){
// The image is ready!
});
document.querySelector('img.my-image').addEventListener('load', function(){
// The image is ready!
});