1

$(document).ready(handler)

call to handler when page is loaded not paying attention to whether iframes' content is loaded or not. I want code to be executed only when content of all iframes loaded.

Is there any way to achieve this?

Boffin
  • 570
  • 2
  • 7
  • 21

2 Answers2

1

This may help solve your problem:

jQuery .ready in a dynamically inserted iframe

Community
  • 1
  • 1
MoDFoX
  • 2,134
  • 2
  • 21
  • 22
1

Use the .load() function to attach a callback to run when the iframe is loaded.

$('iframe.frame').load(function(){
    // do something...
});
gen_Eric
  • 223,194
  • 41
  • 299
  • 337