title: how to execute JS after the page fully shown on safari
body: <p>I got a JS problem, I want to excute a JS function after the whole page shown,the struct of the page such as:</p>
  
  <pre><code>&lt;iframe id="i_frame" src="xxx.jsp"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>and the JS included in the xx.jsp:</p>
  
  <pre><code>...
  &lt;head&gt;
  ...
  &lt;script type="text/javascript" src="yy.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>yy.js:</p>
  
  <pre><code>$(document).ready(function() {
      var i_fram = $(window.parent.document).find('[id="i_frame"]');
      $(i_fram).load(function() {
          alert('trigger!');
      });
  });
  </code></pre>
  
  <p>this works well on PC(chrome), but on Iphone4s(IOS8.1, Safari), the alert trigger befor the page completely shown, even it alert befor the bottom-half of the page shown.I'd tried:"<a href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_ev_onpageshow" rel="nofollow">http://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_ev_onpageshow</a>", it still has this problem.</p>
  
  <p>Is there something different between Safari's renderer and other browsers?</p>