ユーザーがボタンをクリックした後に iframe が読み込まれたかどうかを確認しようとしています。
私は持っている
$('#MainPopupIframe').load(function(){
console.log('load the iframe')
//the console won't show anything even if the iframe is loaded.
})
HTML
<button id='click'>click me</button>
//the iframe is created after the user clicks the button.
<iframe id='MainPopupIframe' src='http://...' />...</iframe>
助言がありますか?
ところで、私の iframe は動的に作成されます。最初のページの読み込みでは読み込まれません。