I have an iframe inside a web page, and I want to do something when it is ready. I tried 2 ways:
In the parent page, I use this
jQuery('#iframe').load(function() { //my code here });
this code will be executed when the iframe is finished loading (as I wanted), but because my iframe is pointed to another domain, so at this point, I can't access its content (cross domain problem)
Inside the iframe, I use this:
jQuery('body').ready(function() { });
This code is executed when the iframe starts loading, which is much earlier than I want, so the code can not function properly.
So how I execute code when the iframe is finished loading and ready for DOM-manipulation
I searched and found that easyXDM may be the solution, but I wonder if there is simpler solution exists.
Thank you.