title: How to check if iframe is loaded or it has a content?
body: <p>I have an iframe with id = "myIframe" and here my code to load it's content : </p>
  
  <pre><code>$('#myIframe').attr("src", "my_url");
  </code></pre>
  
  <p>The problem is sometimes it take too long for loading and sometimes it loaded very quickly. So I must to use "setTimeout" function : </p>
  
  <pre><code>setTimeout(function(){
     if (//something shows iframe is loaded or has content)
     {
         //my code
     }
     else
     {
         $('#myIframe').attr("src",""); //stop loading content
     }
  },5000);
  </code></pre>
  
  <p>All I want to know is how to find out if an iFrame is loaded or it has content. Using <code>iframe.contents().find()</code> will not work. I can't use <code>iframe.load(function(){})</code>.</p>