3
rated 0 times
[
10]
[
7]
/ answers: 1 / hits: 30035
/ 12 Years ago, wed, july 11, 2012, 12:00:00
I have an iframe loaded dynamically with jQuery like this
jQuery('<iframe id=myFrame src=iframesrc.php></iframe>').load(function(){
// do stuff when loaded
}).prependTo(#myDiv);
And I want to catch the reload event every time the inner frame is reloaded. I tried this:
jQuery('body').on('load', '#myDiv', function() {
alert('iframe loaded');
});
But I'm not getting any response, both on the initial load and when following links inside the iframe. What am I doing wrong?
More From » jquery