title: Use jQuery to get a PDF load ready state
body: <p>I have an embedded pdf using an object tag.  I want to know when the object's readyState==4 (or whatever)</p>
  
  <p>I find jQuery's ready() but that looks like it only works on document load.</p>
  
  <p>Other code out there seems to just loop through checking the ready sate, but that seems a little hacky to me.</p>
  
  <p>Is there a nice clean way to do something like:</p>
  
  <pre><code>$("#pdfObject").onStateChange = function(state) {
     if(state==4) ....
  }
  </code></pre>
  
  <p>you get the idea.  </p>