title: Find out when the window.location.href of an iframe has changed with javascript (jquery)
body: <p>The question sums it up really...</p>
  
  <p>I have a parent page with a child iframe,</p>
  
  <p>How do you find out when the location of the iframe has changed, i.e. a user has clicked on a link in the iframe and the iframe is navigating to another page</p>
  
  <p>I know I can bind to the <code>onload</code> event of the iframe like so </p>
  
  <pre><code>$("#theIframe").load(function(){
    //Do something
  }) 
  </code></pre>
  
  <p>But by then it's too late... the page has already loaded...</p>
  
  <p>Basically, I need to find out as soon a link is clicked or form is submitted, or whatever causes the location of the iframe to change...</p>
  
  <p>It does not have to work in IE, but all the better if it does...  and it does not have to be jquery either...</p>
  
  <p>Thanks in advance...</p>