-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
  • 7,153
  • 12
  • 58
  • 101

1 Answers1

2

try pure javascript instead:

window.onload = function(){
    //do stuff here
};
A. Wolff
  • 74,033
  • 9
  • 94
  • 155