-3

My website loads from a few external sources (photos and movies in iframes, Youtube etc)

The code below is executed when my page is loaded but also if external sources are still loading.

$(function() {
    //some code
});

Which code should I use if I want a script to be executed when all the sources are loaded? (including external sources)

Bob van Luijt
  • 6,615
  • 11
  • 53
  • 92

1 Answers1

2

try pure javascript instead:

window.onload = function(){
    //do stuff here
};
A. Wolff
  • 73,242
  • 9
  • 90
  • 149